Message70329
| Author |
amaury.forgeotdarc |
| Recipients |
amaury.forgeotdarc, johnf |
| Date |
2008年07月27日.21:17:56 |
| SpamBayes Score |
0.00046649348 |
| Marked as misclassified |
No |
| Message-id |
<1217193478.72.0.669277922436.issue3454@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|