diff options
author | Andrew Kuchling <amk@amk.ca> | 2014-02-15 17:05:26 -0500 |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2014-02-15 17:05:26 -0500 |
commit | cb3ff4468a4dc9c5758c521f407daad81bca6c89 (patch) | |
tree | 018cddd26a61bc959b04ad40ee007baede9f1dc5 | |
parent | 46ff4ee81cf44c59992c00832a30546293aba0a9 (diff) | |
download | cpython-cb3ff4468a4dc9c5758c521f407daad81bca6c89.tar.gz cpython-cb3ff4468a4dc9c5758c521f407daad81bca6c89.zip |
#16728: Mention collections.abc.Sequence in 'sequence' glossary entry
-rw-r--r-- | Doc/glossary.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 2347828f558..b48eb1ed5f7 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -763,6 +763,14 @@ Glossary mapping rather than a sequence because the lookups use arbitrary :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 An object usually containing a portion of a :term:`sequence`. A slice is created using the subscript notation, ``[]`` with colons between numbers |