]> granicus.if.org Git - python/commitdiff
Bug #1697820: document that the old slice protocol is still used by builtin types.
authorGeorg Brandl <georg@python.org>
Thu, 23 Aug 2007 20:35:00 +0000 (20:35 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 23 Aug 2007 20:35:00 +0000 (20:35 +0000)
Doc/reference/datamodel.rst

index 3e553724384e28d60281bf90537feca0812e0d3b..030d1d9272aefae5e087f2316e3438ce3a71b824 100644 (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