[Python-checkins] cpython (2.7): the default is sys.maxsize not sys.maxint (closes #23645)

benjamin.peterson python-checkins at python.org
Fri Mar 13 20:32:50 CET 2015


https://hg.python.org/cpython/rev/3b91d834160f
changeset:   94984:3b91d834160f
branch:      2.7
parent:      94974:44c1c0cbdc06
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Mar 13 14:32:31 2015 -0500
summary:
  the default is sys.maxsize not sys.maxint (closes #23645)

files:
  Doc/reference/datamodel.rst |  18 +++++++++---------
  1 files changed, 9 insertions(+), 9 deletions(-)


diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1993,15 +1993,15 @@
       :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
-   expression are replaced by zero or ``sys.maxint``, respectively.  If negative
-   indexes are used in the slice, the length of the sequence is added to that
-   index. If the instance does not implement the :meth:`__len__` method, an
-   :exc:`AttributeError` is raised. No guarantee is made that indexes adjusted this
-   way are not still negative.  Indexes which are greater than the length of the
-   sequence are not modified. If no :meth:`__getslice__` is found, a slice object
-   is created instead, and passed to :meth:`__getitem__` instead.
+   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
+   expression are replaced by zero or :attr:`sys.maxsize`, respectively.  If
+   negative indexes are used in the slice, the length of the sequence is added
+   to that index. If the instance does not implement the :meth:`__len__` method,
+   an :exc:`AttributeError` is raised. No guarantee is made that indexes
+   adjusted this way are not still negative.  Indexes which are greater than the
+   length of the sequence are not modified. If no :meth:`__getslice__` is found,
+   a slice object is created instead, and passed to :meth:`__getitem__` instead.
 
 
 .. method:: object.__setslice__(self, i, j, sequence)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list