Next: Special methods for
Up: Special method names
Previous: Special methods for
- __getslice__(self, i, j)
-
Called to implement evaluation of self[i:j]. Note that missing
i or j are replaced by 0 or len(self),
respectively, and len(self) has been added (once) to originally
negative i or j by the time this function is called
(unlike for __getitem__).
- __setslice__(self, i, j, sequence)
-
Called to implement assignment to self[i:j]. Same notes as for
__getslice__.
- __delslice__(self, i, j)
-
Called to implement deletion of self[i:j]. Same notes as for
__getslice__.