[issue11782] email.generator.Generator.flatten() fails

2011-04-08 Thread R. David Murray
R. David Murray added the comment: Terry, the test is in the other issue, so this time Steffen has provided the test :). I'll take a look at both issues, probably next week. -- ___ Python tracker ___

[issue11796] Comprehensions in a class definition mostly cannot access class variable

2011-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Title changed. Generator expressions had the same limitation in 2.x. All comprehensions have the same limitation in 3.x. -- title: list and generator expressions in a class definition fail if expression condition refers to a class variable -> Comprehen

[issue11796] Comprehensions in a class definition mostly cannot access class variable

2011-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Devs are aware that there is an exception to the general rule > for the 'for' clause. There is a technical reason why the > exception is possible, though I have forgotten it. It is best understood when thinking about a gexexp that gets run long after is

[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Elsewhere, Guido said that this appears *not* to be a security bug since the crash is "triggered by a logic bug in the user's code, not by bad data." Hence, not eligible for backport to 2.5/6, which are in security-fix only mode. -- nosy: +terry.reedy

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2011-04-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hasn't this been fixed in the following changeset? changeset: 43509:384f73a104e9 user:Benjamin Peterson date:Wed Jul 07 20:54:01 2010 + summary: make struct sequences subclass tuple; kill lots of code -- nosy: +belopols

[issue11776] types.MethodType() params and usage is not documented

2011-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Messages that only consist of links are classified that way. To refer to other issues, use #x, as with #6040, but I have no idea which of the many messages you were referring to, so use msgxx. The stack overflow link http://stackoverflow.com/questions

[issue11776] types.MethodType() params and usage is not documented

2011-04-08 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg133353 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue11776] types.MethodType() params and usage is not documented

2011-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: For anyone curious, I removed the falsely classified as spam message after copying the links into my previous message. -- ___ Python tracker _

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2011-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Hasn't this been fixed in the following changeset? It was a major step forward. Now there needs to be work on other namedtuple methods and whatnot. -- ___ Python tracker __

[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Ezio Melotti
Ezio Melotti added the comment: See also #9292. -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW I tried to backport 825041fc8e2c and test_pyexpat runs without problem. The snippet of code in msg79398 now raises a ValueError: >>> from xml.parsers import expat >>> f=open('/tmp/foo') >>> p=expat.ParserCreate() >>> f.close() >>> p.ParseFile(f) Traceback (mo

[issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object

2011-04-08 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch combines the changes done to pyexpat in 825041fc8e2c (http://hg.python.org/cpython/diff/825041fc8e2c/Modules/pyexpat.c), the cleanup of c52f5df50448 and the tests of issue4877.patch. The tests segfault without the changes on pyexpat, and pass

[issue11796] Comprehensions in a class definition mostly cannot access class variable

2011-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. I remember now: the initial iter_exp is evaluated immediately because it always *can* be, because it is only evaluated once and can only involve 'outside' names, whereas the result expression and any conditional expressions and further iteration expre

[issue11770] inspect.dir_static

2011-04-08 Thread Andreas Stührk
Andreas Stührk added the comment: A first patch, misses any documentation changes. While working on it, I realised that modules technically shadow the __dict__ attribute (because modules use tp_dictoffset, hence module have a __dict__ member that points to the instance dict). I updated `_shad

[issue1228112] code.py use sys.excepthook to display exceptions

2011-04-08 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue11747] unified_diff function product incorrect range information

2011-04-08 Thread Tim Peters
Tim Peters added the comment: Terry, I had no intention here at all - had nothing to do with unified_diff. Would have to look at the history to see who added it, and ask them. That said, the very name "unified_diff" suggests someone did intend to mimic _some_ system's "unified diff" behavior

[issue11776] types.MethodType() params and usage is not documented

2011-04-08 Thread anatoly techtonik
anatoly techtonik added the comment: Nevermind about #6040 - I just used the same technique to provide a workaround and then remembered I've seen this recipe on StackOverflow. To me types is the right place, because that's exactly where are you sent from the docs of new module: Deprecated

[issue6040] bdist_msi does not deal with pre-release version

2011-04-08 Thread anatoly techtonik
anatoly techtonik added the comment: What for? IIUC, it won't be fixed in distutils anyway. -- ___ Python tracker ___ ___ Python-bugs-

<    1   2