Commit 7f703380 authored by Benjamin Peterson's avatar Benjamin Peterson

the default is sys.maxsize not sys.maxint (closes #23645)

parent ef13cf80
...@@ -1993,15 +1993,15 @@ objects. Immutable sequences methods should at most only define ...@@ -1993,15 +1993,15 @@ objects. Immutable sequences methods should at most only define
:meth:`__getslice__`. Therefore, you have to override it in derived :meth:`__getslice__`. Therefore, you have to override it in derived
classes when implementing slicing.) classes when implementing slicing.)
Called to implement evaluation of ``self[i:j]``. The returned object should be Called to implement evaluation of ``self[i:j]``. The returned object should
of the same type as *self*. Note that missing *i* or *j* in the slice 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 expression are replaced by zero or :attr:`sys.maxsize`, respectively. If
indexes are used in the slice, the length of the sequence is added to that negative indexes are used in the slice, the length of the sequence is added
index. If the instance does not implement the :meth:`__len__` method, an to that index. If the instance does not implement the :meth:`__len__` method,
:exc:`AttributeError` is raised. No guarantee is made that indexes adjusted this an :exc:`AttributeError` is raised. No guarantee is made that indexes
way are not still negative. Indexes which are greater than the length of the adjusted this way are not still negative. Indexes which are greater than the
sequence are not modified. If no :meth:`__getslice__` is found, a slice object length of the sequence are not modified. If no :meth:`__getslice__` is found,
is created instead, and passed to :meth:`__getitem__` instead. a slice object is created instead, and passed to :meth:`__getitem__` instead.
.. method:: object.__setslice__(self, i, j, sequence) .. method:: object.__setslice__(self, i, j, sequence)
......
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