[issue14221] re.sub backreferences to numbered groups produce garbage

2012-03-07 Thread Phillip Feldman
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

[issue13584] argparse doesn't respect double quotes

2011-12-11 Thread Phillip Feldman
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

[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-14 Thread Phillip Feldman
Changes by Phillip Feldman : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue13185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13185] Why does Python interpreter care about curvy quotes in comments?

2011-10-14 Thread Phillip Feldman
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

[issue12961] itertools: unlabelled balls in boxes

2011-09-24 Thread Phillip Feldman
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

[issue12961] itertools: unlabelled balls in boxes

2011-09-20 Thread Phillip Feldman
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

[issue12961] itertools: unlabelled balls in boxes

2011-09-20 Thread Phillip Feldman
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

[issue12961] itertools: unlabelled balls in boxes

2011-09-20 Thread Phillip Feldman
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

[issue12961] itertools: unlabelled balls in boxes

2011-09-17 Thread Phillip Feldman
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

[issue12961] unlabelled balls in boxes

2011-09-11 Thread Phillip Feldman
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

[issue10715] uninformative error message

2010-12-15 Thread Phillip Feldman
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