Skip to content

Commit dbbc07c

Browse files
committed
the default is sys.maxsize not sys.maxint (closes #23645)
1 parent f249671 commit dbbc07c

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,15 +1993,15 @@ objects. Immutable sequences methods should at most only define
19931993
:meth:`__getslice__`. Therefore, you have to override it in derived
19941994
classes when implementing slicing.)
19951995

1996-
Called to implement evaluation of ``self[i:j]``. The returned object should be
1997-
of the same type as *self*. Note that missing *i* or *j* in the slice
1998-
expression are replaced by zero or ``sys.maxint``, respectively. If negative
1999-
indexes are used in the slice, the length of the sequence is added to that
2000-
index. If the instance does not implement the :meth:`__len__` method, an
2001-
:exc:`AttributeError` is raised. No guarantee is made that indexes adjusted this
2002-
way are not still negative. Indexes which are greater than the length of the
2003-
sequence are not modified. If no :meth:`__getslice__` is found, a slice object
2004-
is created instead, and passed to :meth:`__getitem__` instead.
1996+
Called to implement evaluation of ``self[i:j]``. The returned object should
1997+
be of the same type as *self*. Note that missing *i* or *j* in the slice
1998+
expression are replaced by zero or :attr:`sys.maxsize`, respectively. If
1999+
negative indexes are used in the slice, the length of the sequence is added
2000+
to that index. If the instance does not implement the :meth:`__len__` method,
2001+
an :exc:`AttributeError` is raised. No guarantee is made that indexes
2002+
adjusted this way are not still negative. Indexes which are greater than the
2003+
length of the sequence are not modified. If no :meth:`__getslice__` is found,
2004+
a slice object is created instead, and passed to :meth:`__getitem__` instead.
20052005

20062006

20072007
.. method:: object.__setslice__(self, i, j, sequence)

0 commit comments

Comments
 (0)