Skip to content

Commit

Permalink
pythongh-91896: Add abstract methods to collections.abc.ByteString
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Apr 25, 2022
1 parent 4403320 commit b299486
Show file tree
Hide file tree
Showing 4 changed files with 443 additions and 6 deletions.
13 changes: 11 additions & 2 deletions Doc/library/collections.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ ABC Inherits from Abstract Methods Mi
``insert``

:class:`ByteString` :class:`Sequence` ``__getitem__``, Inherited :class:`Sequence` methods
``__len__``
``__len__``,
many others

:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``,
``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``,
Expand Down Expand Up @@ -255,7 +256,6 @@ Collections Abstract Base Classes -- Detailed Descriptions

.. class:: Sequence
MutableSequence
ByteString

ABCs for read-only and mutable :term:`sequences <sequence>`.

Expand All @@ -272,6 +272,15 @@ Collections Abstract Base Classes -- Detailed Descriptions
The index() method added support for *stop* and *start*
arguments.

.. class:: ByteString

An ABC that provides the shared interface for :class:`bytes`
and :class:`bytearray`. It includes abstract methods for the
approximately 50 methods shared by the two types.

.. versionchanged:: 3.11
Previously, this ABC did not define any methods.

.. class:: Set
MutableSet

Expand Down
Loading

0 comments on commit b299486

Please sign in to comment.