Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 634: Fix markup for sequence pattern note #1940

Merged
merged 1 commit into from
Apr 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pep-0634.rst
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ bit set:
- ``range``
- ``tuple``

Note::
.. note::

Although, ``str``, ``bytes`` and ``bytearray`` are usually considered sequences,
they are not included in the above list and not considered to be sequences
when matching a sequence pattern.
Although ``str``, ``bytes``, and ``bytearray`` are usually
considered sequences, they are not included in the above list and do
not match sequence patterns.

A fixed-length sequence pattern fails if the length of the subject
sequence is not equal to the number of subpatterns.
Expand Down Expand Up @@ -442,7 +442,7 @@ where being a mapping is defined as its class being one of the following:
- a builtin class that has its ``Py_TPFLAGS_MAPPING`` bit set
- a class that inherits from any of the above.

The standard library classes ``dict`` and ``mappingroxy`` will have their ``Py_TPFLAGS_MAPPING``
The standard library classes ``dict`` and ``mappingproxy`` will have their ``Py_TPFLAGS_MAPPING``
bit set.

A mapping pattern succeeds if every key given in the mapping pattern
Expand Down