]> granicus.if.org Git - python/commitdiff
#16728: Mention collections.abc.Sequence in 'sequence' glossary entry
authorAndrew Kuchling <amk@amk.ca>
Sat, 15 Feb 2014 22:05:26 +0000 (17:05 -0500)
committerAndrew Kuchling <amk@amk.ca>
Sat, 15 Feb 2014 22:05:26 +0000 (17:05 -0500)
Doc/glossary.rst

index 2347828f55851150db29502bbb12b78dcca49695..b48eb1ed5f76129a8cb204d16df9e8e8a1705713 100644 (file)
@@ -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