New submission from Phillip Feldman :
The first example below works; the second one produces output containing
garbage characters. (This came up while I was creating a set of examples for a
tutorial on regular expressions).
import re
text= "The cat ate the rat."
print("before
New submission from Phillip Feldman :
I tried switching from `optparse` to `argparse`, but ended up reverting back
because `argparse` does not respect double quotes. For example, `optparse`
correctly parses the following, while `argparse` does not:
python myprog.py --ng --INP="De
Changes by Phillip Feldman :
--
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue13185>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Phillip Feldman :
When I try to run a Python script that contains curvy quotes inside comments,
the interpreter gets upset:
SyntaxError: Non-ASCII character '\x92' in file ... on line 20198, but no
encoding declared; see http://www.python.org/peps/pep-0263.html f
Phillip Feldman added the comment:
Raymond-
I think that you may have overestimated the complexity of the problem. In
about 5 hours, I coded, debugged, and documented a set of generator functions
to solve the general formulation (including box limits) for three occupancy
problems
Phillip Feldman added the comment:
With the exception of the "empty boxes forbidden" category, I've come across
all of these at one time or another, many in the context of error control
coding (data communications). Much of the early work on occupancy problems was
motivated
Phillip Feldman added the comment:
Ideally, I'd like to see support for all combinations of the following
occupancy problem features:
- Labeled and unlabeled boxes
- Labeled and unlabeled balls
- Empty boxes allowed and empty boxes forbidden
- Boxes with no capacity limits and with cap
Phillip Feldman added the comment:
Mark: I disagree with your claim that "in its basic form, this is covered by
itertools.combinations". If you open the attached text on elementary
combinatorics and go to page 11, you will see a table that lays out six of the
eight most basi
Phillip Feldman added the comment:
"The itertools module should only have a few of the most generally useful,
especially in combination with other tools."
Balls-in-boxes _is_ one of the most basic of the canonical combinatorial
problems. You can verify this by opening a
New submission from Phillip Feldman :
The current set of combinatorial functions in `itertools` does not include
unlabelled balls in labeled boxes and unlabelled balls in unlabelled boxes. If
the boxes have no capacity limits (i.e., can store an unlimited number of
balls), then the
New submission from Phillip Feldman :
The error message "OSError: [Errno 2] No such file or directory" would be far
more helpful if it specified the name of the file or directory that cannot be
found.
--
messages: 124108
nosy: Phillip.M.Feldman
priority: normal
severity: nor
11 matches
Mail list logo