[Python-checkins] r57343 - python/trunk/Doc/reference/datamodel.rst

georg.brandl python-checkins at python.org
Thu Aug 23 22:35:00 CEST 2007


Author: georg.brandl
Date: Thu Aug 23 22:35:00 2007
New Revision: 57343
Modified:
 python/trunk/Doc/reference/datamodel.rst
Log:
Bug #1697820: document that the old slice protocol is still used by builtin types.
Modified: python/trunk/Doc/reference/datamodel.rst
==============================================================================
--- python/trunk/Doc/reference/datamodel.rst	(original)
+++ python/trunk/Doc/reference/datamodel.rst	Thu Aug 23 22:35:00 2007
@@ -1819,6 +1819,9 @@
 
 .. 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


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /