| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f249671 commit dbbc07c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1993,15 +1993,15 @@ objects. Immutable sequences methods should at most only define | |||
| 1993 | 1993 | :meth:`__getslice__`. Therefore, you have to override it in derived | |
| 1994 | 1994 | classes when implementing slicing.) | |
| 1995 | 1995 | ||
| 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. | ||
| 2005 | 2005 | ||
| 2006 | 2006 | ||
| 2007 | 2007 | .. method:: object.__setslice__(self, i, j, sequence) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments