Skip to content

Commit

Permalink
PEP 634: Clarify late-registration edge-case (GH-2001)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher authored Jun 24, 2021
1 parent 19ba254 commit c043875
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ pep-0631.rst @pganssle
pep-0632.rst @zooba
pep-0633.rst @brettcannon
pep-0634.rst @brandtbucher @gvanrossum
pep-0635.rst @gvanrossum
pep-0636.rst @gvanrossum
pep-0635.rst @brandtbucher @gvanrossum
pep-0636.rst @brandtbucher @gvanrossum
pep-0637.rst @stevendaprano
pep-0638.rst @markshannon
pep-0639.rst @pfmoore
Expand Down
6 changes: 4 additions & 2 deletions pep-0634.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ where being a sequence is defined as its class being one of the following:
- a class that inherits from ``collections.abc.Sequence``
- a Python class that has been registered as a ``collections.abc.Sequence``
- a builtin class that has its ``Py_TPFLAGS_SEQUENCE`` bit set
- a class that inherits from any of the above.
- a class that inherits from any of the above (including classes defined *before* a
parent's ``Sequence`` registration)

The following standard library classes will have their ``Py_TPFLAGS_SEQUENCE``
bit set:
Expand Down Expand Up @@ -440,7 +441,8 @@ where being a mapping is defined as its class being one of the following:
- a class that inherits from ``collections.abc.Mapping``
- a Python class that has been registered as a ``collections.abc.Mapping``
- a builtin class that has its ``Py_TPFLAGS_MAPPING`` bit set
- a class that inherits from any of the above.
- a class that inherits from any of the above (including classes defined *before* a
parent's ``Mapping`` registration)

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

0 comments on commit c043875

Please sign in to comment.