On 2/9/06, Travis Oliphant <oliphant.travis at ieee.org> 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4