This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2003-06-11.04:20:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

Russ, you're right about there being two behaviors for the 
implementation of the slice notation(see apply_slice() in 
Python/ceval.c).  This occurs in the bytecode interpreter 
rather than some object's implementation of __getitem__.

While it is unfortunate, it can't be fixed without breaking 
code which defines __getitem__ but doesn't provide a None-
to-zero converter.

Factiod of the day, interpreter doesn't just assume 0 for 
None, it clamps the values in a range of 0<= value <= 
sys.maxint:

>>> class C:
        def __getitem__(self, i):
            return i

>>> c = C()
>>> c[10000000000000000000L:]
slice(2147483647, 2147483647, None)


I recommend you close the bug as Won't Fix.
History
Date User Action Args
2007-08-23 14:12:33adminlinkissue723806 messages
2007-08-23 14:12:33admincreate