Commit c79fea99 authored by Georg Brandl's avatar Georg Brandl

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

parent 0a68876e
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment