Bug #1697820: document that the old slice protocol is still used by builtin types.

This commit is contained in:
Georg Brandl 2007-08-23 20:35:00 +00:00
parent ac4018ae39
commit 8d9e84554e
1 changed files with 3 additions and 0 deletions

View File

@ -1819,6 +1819,9 @@ objects. Immutable sequences methods should at most only define
.. deprecated:: 2.0
Support slice objects as parameters to the :meth:`__getitem__` method.
(However, built-in types in CPython currently still implement
:meth:`__getslice__`. Therefore, you have to override it in derived
classes when implementing slicing.)
Called to implement evaluation of ``self[i:j]``. The returned object should be
of the same type as *self*. Note that missing *i* or *j* in the slice