On 2/9/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > Guido seemed accepting to this idea about 9 months ago when I spoke to > him. I finally got around to writing up the PEP. I'd really like to > get this into Python 2.5 if possible. > > -Travis > > > > > PEP: ### > Title: Allowing any object to be used for slicing
Overally I am fine with the idea. Being used as an index is different than coercion into an int so adding this extra method seems reasonable. > Implementation Plan > > 1) Add the slots > > 2) Change the ISINT macro in ceval.c to accomodate objects with the > index slot defined. > Maybe the macro should also be renamed? Not exactly testing if something is an int anymore if it checks for __index__. > 3) Change the _PyEval_SliceIndex function to accomodate objects > with the index slot defined. > -Brett _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com