Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-26 Thread exarkun
On 25 Dec, 10:31 pm, mer...@netwok.org wrote: faulthandler is a module: enable the handler is simple as import faulthandler. That sounds like a source of unwanted behavior (aka problems) if the handler is enabled by 1Cpydoc faulthandler 1D or by a pkgutil walk. You may want to consider using

Re: [Python-Dev] [Python-checkins] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-26 Thread Éric Araujo
Le 24/12/2010 02:08, Nick Coghlan a écrit : On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo python-check...@python.org wrote: Fix small inaccuracy: there is no index function Yes, there is, it just isn't a builtin - it lives in the operator module. Defining object.__index__ with operator.index

Re: [Python-Dev] r87389 - in python/branches/py3k: Doc/library/unittest.rst Lib/unittest/case.py Misc/NEWS

2010-12-26 Thread Ron Adam
On 12/24/2010 02:03 PM, Raymond Hettinger wrote: On Dec 24, 2010, at 10:56 AM, Terry Reedy wrote: On 12/24/2010 11:09 AM, Michael Foord wrote: On 22/12/2010 02:26, Terry Reedy wrote: On 12/21/2010 7:17 AM, Michael Foord wrote: My first priority is that doc and code match. Close second is

[Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Sven Brauch
Hi there, I recently filed a feature request in the tracker to change the behaviour of the parser in terms of setting ranges on attribute AST nodes, because I'm working on an application which needs more information than is currently provided. I suggested to change the behaviour from foo.bar.baz

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-26 Thread Victor Stinner
Le dimanche 26 décembre 2010 à 14:10 +, exar...@twistedmatrix.com a écrit : On 25 Dec, 10:31 pm, mer...@netwok.org wrote: faulthandler is a module: enable the handler is simple as import faulthandler. That sounds like a source of unwanted behavior (aka problems) if the handler is

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Benjamin Peterson
2010/12/26 Sven Brauch svenbra...@googlemail.com: Hi there, I recently filed a feature request in the tracker to change the behaviour of the parser in terms of setting ranges on attribute AST nodes, because I'm working on an application which needs more information than is currently

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Sven Brauch
It should maybe be noted that the proposed patch would change that, too, so it would be the same behaviour for all three types (subscripts, calls, and attributes) again. Just more intuitive. :) 2010/12/27 Benjamin Peterson benja...@python.org: 2010/12/26 Sven Brauch svenbra...@googlemail.com:

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-26 Thread Nick Coghlan
On Mon, Dec 27, 2010 at 8:57 AM, Victor Stinner victor.stin...@haypocalc.com wrote: Le dimanche 26 décembre 2010 à 14:10 +, exar...@twistedmatrix.com a écrit : On 25 Dec, 10:31 pm, mer...@netwok.org wrote: faulthandler is a module: enable the handler is simple as import faulthandler.

[Python-Dev] Range __contains__ and objects with __index__ methods

2010-12-26 Thread Nick Coghlan
Starting in Python 3.2, range() supports fast containment checking for integers (i.e. based on an O(1) arithmetic calculation rather than an O(N) iteration through the entire sequence). Currently, this fast path ignores objects that implement __index__ - they are relegated to the slow iterative

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Nick Coghlan
On Mon, Dec 27, 2010 at 9:34 AM, Benjamin Peterson benja...@python.org wrote: 2010/12/26 Sven Brauch svenbra...@googlemail.com: In that discussion, there's been different opinions about which behaviour is better; main arguments were consistency for the current and usefulness for the suggested

Re: [Python-Dev] Range __contains__ and objects with __index__ methods

2010-12-26 Thread Terry Reedy
On 12/26/2010 7:15 PM, Nick Coghlan wrote: Starting in Python 3.2, range() supports fast containment checking for integers (i.e. based on an O(1) arithmetic calculation rather than an O(N) iteration through the entire sequence). Currently, this fast path ignores objects that implement __index__

Re: [Python-Dev] [Python-checkins] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-26 Thread Terry Reedy
On 12/26/2010 7:01 PM, Nick Coghlan wrote: Yes, the definition in the language reference could definitely be improved to mention the semantics first, and then reference operator.index second. Possible wording Indicates to the Python interpreter that the object is semantically equivalent to the

Re: [Python-Dev] Range __contains__ and objects with __index__ methods

2010-12-26 Thread Martin v. Löwis
What are the actual used of .__index__? Can you please rephrase this question? Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] Range __contains__ and objects with __index__ methods

2010-12-26 Thread Nick Coghlan
On Mon, Dec 27, 2010 at 11:52 AM, Terry Reedy tjre...@udel.edu wrote: Return a converted to an integer. Equivalent to a.__index__(). comes close to implying equality (if possible). What are the actual used of .__index__? PEP 357 gives the original rationale - it was to allow integer-like