Message70329
When executing self[i:j], the __getslice__(self,i,j) method is called
first, if it exists. See
http://docs.python.org/ref/sequence-methods.html
Yes, the __(get|set|del)slice__ methods are deprecated since 2.0, but
for compatibility the built-in types must keep defining them. You may
want to override them as well if your class inherit from such a type.
With python 3.0 the __getslice__ slots were removed, and __getitem__ is
called in all cases. |
|
Date |
User |
Action |
Args |
2008-07-27 21:17:59 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, johnf |
2008-07-27 21:17:58 | amaury.forgeotdarc | set | messageid: <1217193478.72.0.669277922436.issue3454@psf.upfronthosting.co.za> |
2008-07-27 21:17:57 | amaury.forgeotdarc | link | issue3454 messages |
2008-07-27 21:17:56 | amaury.forgeotdarc | create | |
|