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 connelly
Date 2004-06-17.21:50:16
SpamBayes Score
Marked as misclassified
Logged In: YES 

I'm not sure what you mean by 'make your classes new-style'.

According to, the 
__getitem__ method should be used, and the __getslice__ 
method is deprecated.

If you subclass the built-in list type, then the __getitem__ 
method is *not* called when subscripting with a slice.  
Instead, the __getslice__ method is called.  Try it out.

So I can't see any reasonable way to get around this bug.

You can try and modify the class C shown above, so that it 
behaves correctly.  I don't think you will be able to do it 
without putting in special "workaround" code to avoid this 
Python bug.

y = C([1, 2, 3])
>>> print y[-7:-5]         # should be [].

Date User Action Args
2008-01-20 09:56:57adminlinkissue974635 messages
2008-01-20 09:56:57admincreate