This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年07月27日 19:58 by johnf, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| getitem_problem.py | johnf, 2008年07月27日 19:58 | |||
| Messages (1) | |||
|---|---|---|---|
| msg70329 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年07月27日 21:17 | |
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 |
| 2022年04月11日 14:56:37 | admin | set | github: 47704 |
| 2008年07月27日 21:17:57 | amaury.forgeotdarc | set | status: open -> closed resolution: wont fix messages: + msg70329 nosy: + amaury.forgeotdarc |
| 2008年07月27日 19:58:01 | johnf | create | |