[issue6780] startswith error message is incomplete

2009-08-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: In the examples you used byte strings for Py2 and Unicode strings for Py3. On Py3 the same example with byte strings gives an error similar to the one raised by Py2: bfoo.startswith([bfo]) Traceback (most recent call last): File stdin,

[issue6744] calling kevent repr raises a TypeError

2009-08-25 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - christian.heimes nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6744 ___

[issue6738] Wrong doc strings in itertools

2009-08-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6738 ___ ___ Python-bugs-list

[issue6701] Make custom xmlrpc extension easier

2009-08-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +krisvale priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6701 ___ ___

[issue6738] Wrong doc strings in itertools

2009-08-25 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6738 ___

[issue6662] HTMLParser.HTMLParser doesn't handle malformed charrefs

2009-08-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Confirmed on Python3.1 too. -- nosy: +ezio.melotti priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6662 ___

[issue6781] even exponentiation of negative numbers

2009-08-25 Thread benlbroussard
New submission from benlbroussard benlbrouss...@gmail.com: Negative one squared should be one, but is negative one sometimes. pow(-1, 2) = 1 -1 ** 2 = -1 -1 ^ 2 = -1 The ** and ^ operators aren't working like expected, and the pow() documentation is incorrect since it says The two-argument

[issue6781] even exponentiation of negative numbers

2009-08-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: This is not a bug: -1 ** 2 is parsed as -(1 ** 2), not (-1) ** 2. Take a look at: http://docs.python.org/reference/expressions.html#the-power-operator In -1 ^ 2, ^ is the bitwise exclusive-or operator, not the power operator. pow(x, y) is

[issue6781] even exponentiation of negative numbers

2009-08-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: By the way, I get -1 ^ 2 == -3, not -1: -1 ^ 2 -3 If you're getting -1 instead, then that *is* a bug! Are you? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6781

[issue6782] Scoping of variables in closures

2009-08-25 Thread victor
New submission from victor bitto...@uwp.edu: I can't tell if this is feature or a bug but either way this behavior struck me as strange. def func(): x = 5 def inc(): temp = x + 1 # when inc() is execute, this line fails x = temp return x return inc i = func() i() # will raise

[issue6782] Scoping of variables in closures

2009-08-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It's feature. In python 3 you can use the 'nonlocal' keyword to access the variable in the outer scope for assignment. -- nosy: +r.david.murray priority: - normal resolution: - invalid stage: - committed/rejected

[issue6782] Scoping of variables in closures

2009-08-25 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6782 ___ ___

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-25 Thread Cherniavsky Beni
Cherniavsky Beni c...@users.sf.net added the comment: Nice. 2 questions: 1. Why not change getch() to always use get_wch()? 2. I think you also want fix getkey() / introduce get_wkey(). -- nosy: +cben ___ Python tracker rep...@bugs.python.org

[issue3329] API for setting the memory allocator used by Python

2009-08-25 Thread PJ McNerney
PJ McNerney pjmcner...@gmail.com added the comment: Has the ability to set the memory allocator been added to Python 2.7/3.1? Thanks, PJ -- nosy: +pjmcnerney versions: +Python 3.2 -Python 2.5, Python 2.6, Python 3.0 ___ Python tracker

[issue6783] Add a builtin method to 'int' for base/radix conversion

2009-08-25 Thread Yuv Gre
New submission from Yuv Gre ubershme...@gmail.com: In javascript and java each number has a toString method which allows for easy string representation in different bases. If the function int(x[, base]) exists as a builtin, the inverse should at least be somewhere in the standard library.

[issue6783] Add a builtin method to 'int' for base/radix conversion

2009-08-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: This seems like the sort of idea that should be floated on the python- ideas mailing list or comp.lang.python first, both to find out what support there is and to pin down precise semantics. We already have int to string conversions in bases

[issue6783] Add a builtin method to 'int' for base/radix conversion

2009-08-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: See http://mail.python.org/pipermail/python-dev/2006-January/059789.html for a previous related discussion. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6783

[issue1068268] subprocess is not EINTR-safe

2009-08-25 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1068268 ___ ___

[issue4625] IDLE won't open anymore, .idlerc unaccessible

2009-08-25 Thread Sophia K. Cheng
Sophia K. Cheng sophia.ch...@gmail.com added the comment: Thanks!! This worked perfectly! Finally got around to trying this out today. Sincerely, Sophia On 3/20/09 4:26 AM, Timothy Zhang rep...@bugs.python.org wrote: Timothy Zhang z...@live.cn added the comment: I meet the same

[issue6783] Add a builtin method to 'int' for base/radix conversion

2009-08-25 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6783 ___ ___ Python-bugs-list

[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-25 Thread Ryan Leslie
Ryan Leslie ryle...@gmail.com added the comment: Hi Art, Thanks for working on this. I've taken a look at the patch. The fix to read_test looks correct. Of course, I would consider a more descriptive variable name than 'b'. The changes to read() are an improvement, but I think we need to be