[Patches] [Patch #101388] Backward compatibility hook
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 15 Sep 2000 09:51:33 -0700
Patch #101388 has been updated.
Project:
Category: documentation
Status: Open
Summary: Backward compatibility hook
Follow-Ups:
Date: 2000-Sep-01 07:41
By: jhylton
Comment:
same deal: postponed for now, but may be considered post 2.0b1
-------------------------------------------------------
Date: 2000-Sep-15 07:17
By: fdrake
Comment:
The test using sys.hexversion may be more readable if sys.version_info is used instead:
if sys.version_info < (2, 0): ...
-------------------------------------------------------
Date: 2000-Sep-15 09:51
By: gvanrossum
Comment:
This is a doc update.
But I believe that it's backwards.
The proper solution is to let __getslice__(self, lo, hi) call self.__getitem__(slice(lo, hi)) -- or self[lo:hi:]; and similar for the others. Then you can write code in __getitem__ that handles slice objects (and tuples of slice objects).
Why does he use max(i,0) etc.? I don't think that's needed or correct!
The version check could be done to make it a bit faster.
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=101388&group_id=5470