#16728: Mention collections.abc.Sequence in 'sequence' glossary entry
This commit is contained in:
parent
46ff4ee81c
commit
cb3ff4468a
|
@ -763,6 +763,14 @@ Glossary
|
||||||
mapping rather than a sequence because the lookups use arbitrary
|
mapping rather than a sequence because the lookups use arbitrary
|
||||||
:term:`immutable` keys rather than integers.
|
:term:`immutable` keys rather than integers.
|
||||||
|
|
||||||
|
The :class:`collections.abc.Sequence` abstract base class
|
||||||
|
defines a much richer interface that goes beyond just
|
||||||
|
:meth:`__getitem__` and :meth:`__len__`, adding :meth:`count`,
|
||||||
|
:meth:`index`, :meth:`__contains__`, and
|
||||||
|
:meth:`__reversed__`. Types that implement this expanded
|
||||||
|
interface can be registered explicitly using
|
||||||
|
:func:`~abc.register`.
|
||||||
|
|
||||||
slice
|
slice
|
||||||
An object usually containing a portion of a :term:`sequence`. A slice is
|
An object usually containing a portion of a :term:`sequence`. A slice is
|
||||||
created using the subscript notation, ``[]`` with colons between numbers
|
created using the subscript notation, ``[]`` with colons between numbers
|
||||||
|
|
Loading…
Reference in New Issue