__setitem__ without position
Peter Otten
__peter__ at web.de
Fri Oct 12 12:42:37 EDT 2012
More information about the Python-list mailing list
Fri Oct 12 12:42:37 EDT 2012
- Previous message (by thread): __setitem__ without position
- Next message (by thread): Posix call (execve) breaks mercurial?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ethan Furman wrote: > Terry Reedy wrote: >> In 3.x, you would write __setitem__ to recognize that the 'key' is a >> slice object rather than an int and act accordingly. (In 2.x, you would >> write __setslice__.) > > I'm not sure how far back it goes, but at least from 2.4 forward > __setitem__ works with slices just fine. The __...slice__() methods are deprecated since 2.0. http://docs.python.org/release/2.0/ref/sequence-methods.html
- Previous message (by thread): __setitem__ without position
- Next message (by thread): Posix call (execve) breaks mercurial?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list