[issue1714448] if something as x:

2009-03-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Rejecting this after discussion on python-ideas: http://mail.python.org/pipermail/python-ideas/2009-March/003423.html Overview of some of the major objections here: http://mail.python.org/pipermail/python-ideas/2009-March/003440.html

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: To see what is wrong with v2, try something like: class Bizarre(): def __getattr__(self, attr): raise SkipStatement with Bizarre(): print Not gonna happen, but no exception either! --

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Version 3 of patch attached - now functionally complete with the correct semantics - compiler package not updated yet - documentation not updated yet Unfortunately, getting the semantics right involves moving context.__enter__ and

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Updated micro benchmark to also give numbers for direct try/finally execution -- Added file: http://bugs.python.org/file13338/pep377_bench.py ___ Python tracker rep...@bugs.python.org

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-15 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'm definitely not happy with the effect the current patch has on with statement execution speed - I think I'll try to come up with a patch that adds a new SETUP_WITH opcode and see how that performs. --

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-15 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: Removed file: http://bugs.python.org/file13264/pep377_bench.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5251 ___

[issue5493] Rephrasing the doc of object.__nonzero__

2009-03-15 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: The doc [1] actually says: object.__nonzero__(self) Called to implement truth value testing, and the built-in operation bool(); should return False or True, or their integer equivalents 0 or 1. When this method is not defined,

[issue5494] Failure in test_httpservers on Linux

2009-03-15 Thread Ger Luijten
New submission from Ger Luijten gcjm.luij...@gmail.com: Hello developers, While running 'make test' for Python 3.1a1 there was an error reported, obviously a permission problem, but when trying to run the reported server.py script in verbose mode it turned up an error in the regrtest.py script.

[issue4951] failure in test_httpservers

2009-03-15 Thread Ger Luijten
Ger Luijten gcjm.luij...@gmail.com added the comment: Reported Issue 5494 Failure in test_httpservers on Linux with other error message. Maybe there is a relation, maybe not. Greetings, Ger -- nosy: +gerluijten ___ Python tracker

[issue5495] ValueError exception of tuple.index(x) gives imprecise error message

2009-03-15 Thread Retro
New submission from Retro vinet...@gmail.com: t = (0, 1, 2, 3, 4, 5, 6, 7) t.index(8) Traceback (most recent call last): File stdin, line 1, in module ValueError: tuple.index(x): x not in list The error message x not in list should have been x not in tuple. Please fix the error message of

[issue5495] ValueError exception of tuple.index(x) gives imprecise error message

2009-03-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Attached patch fixes the error message. -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file13339/not_in_tuple.patch ___ Python tracker rep...@bugs.python.org

[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2009-03-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is a problem of units. The error text is an utf8 *byte* string and offset is a number of *bytes*. The goal is to get the text *width* of a *character* string. We have to: 1- convert offset from bytes number to character

[issue1714448] if something as x:

2009-03-15 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: Just for the record, I wasn't happy with ~= either, and I have no problem with just forgetting the whole idea. -- ___ Python tracker rep...@bugs.python.org

[issue5396] os.read not handling O_DIRECT flag

2009-03-15 Thread Eduardo Aguiar
Eduardo Aguiar agu...@users.sourceforge.net added the comment: Hi, I think I have a few more issues you can consider: 1) to allocated an aligned buffer it is as simple as allocate 4096 + len (buffer) and truncate address to 4k boundary. 2) I wrote a floppy imager, and without O_DIRECT, it

[issue444582] Finding programs in PATH, addition to os

2009-03-15 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- nosy: -skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue444582 ___ ___ Python-bugs-list

[issue5396] os.read not handling O_DIRECT flag

2009-03-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hello Eduardo, 1) to allocated an aligned buffer it is as simple as allocate 4096 + len (buffer) and truncate address to 4k boundary. Yes, but it is wasteful, especially since the common case is not to use O_DIRECT. Also, os.read does not

[issue5496] codecs.lookup docstring is misleading

2009-03-15 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: codecs.lookup is documented as returning a tuple. It actually returns a what the registered lookup function returns, which really *should* be a codecs.CodecInfo instance. If a registered lookup function actually returns a tuple, then

[issue5496] codecs.lookup docstring is misleading

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r70386. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5496 ___

[issue5493] Rephrasing the doc of object.__nonzero__

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r70387. -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5493 ___

[issue5491] Clarify contextlib.nested semantics

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, committed in r70390. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5491 ___

[issue5493] Rephrasing the doc of object.__nonzero__

2009-03-15 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5493 ___ ___ Python-bugs-list

[issue5488] nb_inplace_divide slot is missing in docs

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r70392. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5488 ___

[issue5478] document mistake xml.dom.minidom.Element

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r70393. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5478 ___

[issue5276] IDLE startup file .Idle.py not documented

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, edited a bit and committed in r70395. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5276

[issue5469] Reference paragraph about the constructs that bind names needs updating for Python 3

2009-03-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in trunk in r70397 and 3k in r70398. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5469

[issue1064] Test issue

2009-03-15 Thread Martin v. Löwis
Martin v. L=C3=B6wis mar...@v.loewis.de added the comment: Try sending email -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1064 ___ ___

[issue1064] Test issue

2009-03-15 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Send more email -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1064 ___ ___

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-15 Thread James William Pye
James William Pye x...@jwp.name added the comment: I tested the attached script against v2. It further identifies consistencies between nested with-statements and nested() that should exist(and do in v2). It answers the question: what is the effect of a SkipStatement exception on another, outer

[issue3565] array documentation, method names not 3.0 compliant

2009-03-15 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3565 ___ ___ Python-bugs-list

[issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line.

2009-03-15 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: Resolution of this may be applicable to Issue3446 as well. center, ljust and rjust are inconsistent with unicode parameters -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org