summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2022-05-06 07:16:22 (GMT)
committerGitHub <noreply@github.com>2022-05-06 07:16:22 (GMT)
commit93364f9716614173406a4c83cd624b37d9a02ebf (patch)
tree21604d3f0b29c347f14fe3e6a1c79bf60e61b687 /Doc
parentfa4f0a134e7911b2494ea9866c8a49ff446f9d6c (diff)
downloadcpython-93364f9716614173406a4c83cd624b37d9a02ebf.zip
cpython-93364f9716614173406a4c83cd624b37d9a02ebf.tar.gz
cpython-93364f9716614173406a4c83cd624b37d9a02ebf.tar.bz2
gh-78157: [Enum] nested classes will not be members in 3.13 (GH-92366)
- add member() and nonmember() functions - add deprecation warning for internal classes in enums not becoming members in 3.13 Co-authored-by: edwardcwang
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/enum.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 52ef009..5db5639 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -124,9 +124,18 @@ Module Contents
Enum class decorator that checks user-selectable constraints on an
enumeration.
+ :func:`member`
+
+ Make `obj` a member. Can be used as a decorator.
+
+ :func:`nonmember`
+
+ Do not make `obj` a member. Can be used as a decorator.
+
.. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto``
.. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``FlagBoundary``, ``property``
+.. versionadded:: 3.11 ``member``, ``nonmember``
---------------
@@ -791,6 +800,18 @@ Utilities and Decorators
.. versionadded:: 3.11
+.. decorator:: member
+
+ A decorator for use in enums: it's target will become a member.
+
+ .. versionadded:: 3.11
+
+.. decorator:: nonmember
+
+ A decorator for use in enums: it's target will not become a member.
+
+ .. versionadded:: 3.11
+
---------------
Notes