[issue2299] Minor typos in newtypes.rst

2008-03-15 Thread Douglas Greiman
New submission from Douglas Greiman <[EMAIL PROTECTED]>: Fix three minor typos in Doc/extending/newtypes.rst -- assignee: georg.brandl components: Documentation files: Doc-newtypes-typos-20080315.diff keywords: patch messages: 63572 nosy: dgreiman, georg.brandl severity: minor

[issue2298] Patch for "string without null bytes" check in getargs.c

2008-03-15 Thread Douglas Greiman
ior: TypeError: __import__() argument 1 must be string without null bytes, not str Correct behavior: ImportError Note the lack of null bytes: >>> '\u0080'.encode('utf-8') b'\xc2\x80' -- components: Interpreter Core files: py3k-getargs-null-b

[issue2297] Patch for fatal stack overflow in Windows caused by -v

2008-03-15 Thread Douglas Greiman
erflow exception is swallowed, other times it is not. The bug depends on the particular locale settings of the Windows machine. To reproduce: python_d.exe -v and look for many repeated imports of encodings. Patch is attached. -- components: Interpreter Core files: py3k-win-codec-recursion-20

[issue2291] Catching all exceptions with 'object'

2008-03-15 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: On Sat, Mar 15, 2008 at 5:30 PM, Neal Norwitz <[EMAIL PROTECTED]> wrote: > > Neal Norwitz <[EMAIL PROTECTED]> added the comment: > > See PEP 352. Currently this is slated for python 2.8. Perhaps the > schedule should be sped up a bit in lig

[issue2296] [PATCH] Tcl/Tk 8.4.16 patches needed to get an x64 Windows build

2008-03-15 Thread Christian Heimes
Changes by Christian Heimes <[EMAIL PROTECTED]>: -- assignee: -> loewis components: +Windows keywords: +64bit priority: -> normal type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2185] code objects should conserve memory

2008-03-15 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: Marshal is the wrong place for this sort of thing (the code object is where it should be done). I botched the analysis. The case is common, but only for the empty tuple which I forgot to ignore. (None,) was a common case when I measured it.

[issue2296] [PATCH] Tcl/Tk 8.4.16 patches needed to get an x64 Windows build

2008-03-15 Thread Trent Nelson
Trent Nelson <[EMAIL PROTECTED]> added the comment: And the tcl patch... Added file: http://bugs.python.org/file9677/tcl-8.4.16.patch __ Tracker <[EMAIL PROTECTED]> __

[issue2296] [PATCH] Tcl/Tk 8.4.16 patches needed to get an x64 Windows build

2008-03-15 Thread Trent Nelson
New submission from Trent Nelson <[EMAIL PROTECTED]>: Martin, I've attached two patches required in order to get Tcl/Tk 8.4.16 to successfully compile on Windows x64. I haven't included the patch to external-amd64.bat (and pcbuild/readme.txt with updated build instructions) yet as I wanted to co

[issue2291] Catching all exceptions with 'object'

2008-03-15 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: See PEP 352. Currently this is slated for python 2.8. Perhaps the schedule should be sped up a bit in light the current release schedule. Brett, any comments? We should add all the warnings from PEP 352 with the -3 flag to 2.6. -- n

[issue2294] Bug in Pickle protocol involving __setstate__

2008-03-15 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Closing as invalid. -- nosy: +georg.brandl resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Just a nit: the syntax error message for invalid starred expressions should be changed from "can use starred expression only as assignment target". -- nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> <

[issue1810] AST compile() patch

2008-03-15 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: I'll try to handle it this weekend. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing li

[issue2294] Bug in Pickle protocol involving __setstate__

2008-03-15 Thread Tim Gordon
Tim Gordon <[EMAIL PROTECTED]> added the comment: You've missed off the two underscores after the name __setstate__ :p -- nosy: +QuantumTim __ Tracker <[EMAIL PROTECTED]> __ __

[issue2295] cPickle corner case - docs or bug?

2008-03-15 Thread Greg Kochanski
New submission from Greg Kochanski <[EMAIL PROTECTED]>: If you attempt to cPickle a class, cPickle checks that it can get the identical class by importing it. If that check fails, it reports: Traceback (most recent call last): ... "/usr/local/lib/python2.5/site-packages/newstem2-0.12.3-py2.5-lin

[issue2294] Bug in Pickle protocol involving __setstate__

2008-03-15 Thread Greg Kochanski
New submission from Greg Kochanski <[EMAIL PROTECTED]>: If we have a hierarchy of classes, and we use __getstate__/__setstate__, the wrong class' __setstate__ gets called. Possibly, this is a documentation problem, but here goes: Take two classes, A and B, where B is the child of A. Construct

[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-15 Thread Mark Summerfield
Mark Summerfield <[EMAIL PROTECTED]> added the comment: You're right that the parser should not recognise "utf8" since it isn't correct XML (as per the references you gave). I made the mistake because I used the etree module and wrote an XML file with encoding "utf8" which etree accepted. I've n

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: It looks like I completely missed PEP 3132. Sorry for a misleading comment above. At least I am not alone: "A little new feature in Python 3 that many overviews don't tell you about: extended unpacking." http://pyside.blogspot.com/2

[issue2293] Missing case / switch / evaluate

2008-03-15 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: This is a bug tracker and not a help forum. Please use the Python general mailinglist to get help. Your problem can be solved with a pattern called "dispatcher dict". -- nosy: +tiran resolution: -> invalid status: open -> closed _

[issue2293] Missing case / switch / evaluate

2008-03-15 Thread BODIN
New submission from BODIN <[EMAIL PROTECTED]>: I am not the code : if toto == 1: ... elsif toto == 2: ... elsif In ADA for example : case C is-- 4 Start a case statement when Red => Result := 1; when Blue =>Result := 2;

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Guido van Rossum
Changes by Guido van Rossum <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9675/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Guido van Rossum
Changes by Guido van Rossum <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9674/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Thomas Wouters
Thomas Wouters <[EMAIL PROTECTED]> added the comment: On Sat, Mar 15, 2008 at 9:18 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Guido van Rossum <[EMAIL PROTECTED]> added the comment: > > Looking at the flatten() example I'm curious -- how come the output of > > >>> flatten(L) > > is disp

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: Looking at the flatten() example I'm curious -- how come the output of >>> flatten(L) is displayed as a list rather than as ? Also, do I understand correctly that yield *(1, 2, 3) is equivalent to yield 1 yield 2 yield 3 ? (That's re

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Thomas Wouters
Thomas Wouters <[EMAIL PROTECTED]> added the comment: On Sat, Mar 15, 2008 at 9:12 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Guido van Rossum <[EMAIL PROTECTED]> added the comment: > > Didn't you say it does sets too? Does this work? > a = [1, 2, 3] > {1, *a, 0, 4} # {0, 1, 2, 3, 4}

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: Didn't you say it does sets too? Does this work? a = [1, 2, 3] {1, *a, 0, 4} # {0, 1, 2, 3, 4} How about dicts? kwds = {'z': 0, 'w': 12} {'x': 1, 'y': 2, **kwds} # {'x': 1, 'y': 2, 'z': 0, 'w': 12} Also, now that we support [*a, b, c]

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: This was discussed years ago and never got enough support: http://mail.python.org/pipermail/python-dev/2005-October/057177.html -- nosy: +belopolsky type: -> feature request __ Tracker <[EMAIL

[issue1158] %f format for datetime objects

2008-03-15 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Checking this in. All tests pass. Have for quite awhile. rev 61402. -- assignee: -> skip.montanaro __ Tracker <[EMAIL PROTECTED]> _

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Thomas Wouters
New submission from Thomas Wouters <[EMAIL PROTECTED]>: The attached patch adds the missing *-unpacking generalizations. Specifically: >>> a, b, *c = range(5) >>> *a, b, c = a, b, *c >>> a, b, c ([0, 1, 2], 3, 4) >>> [ *a, b, c ] [0, 1, 2, 3, 4] >>> L = [ a, (3, 4), {5}, {6: None}, (i for i in

[issue2290] [PATCH] Update Lib/distutils/sysconfig.py to handle x64 Windows builds living in pcbuild/amd64.

2008-03-15 Thread Trent Nelson
Trent Nelson <[EMAIL PROTECTED]> added the comment: Ah, I suspect not. (Unless the 64-bit python*.exe builds end up in pcbuild/amd64.) -- versions: -Python 2.5 __ Tracker <[EMAIL PROTECTED]> __

[issue1810] AST compile() patch

2008-03-15 Thread Thomas Lee
Thomas Lee <[EMAIL PROTECTED]> added the comment: Updating the patch to apply cleanly against HEAD. Added file: http://bugs.python.org/file9672/ast-r03.patch __ Tracker <[EMAIL PROTECTED]> __