summaryrefslogtreecommitdiff
path: root/Doc/library/enum.rst
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2021-10-20 16:07:42 -0700
committerEthan Furman <ethan@stoneleaf.us>2021-10-20 16:07:42 -0700
commit629eb1c9ce67812fc44ed033c9d5f9935f7e9688 (patch)
tree5678e212cbd392c26d0476908aca1391a4554d69 /Doc/library/enum.rst
parentf40b230df91f29fa4a84c1d127b4eab56a6eda27 (diff)
downloadcpython-git-enum-lost-fixes.tar.gz
restore fixes lost in enum reversionenum-lost-fixes
Diffstat (limited to 'Doc/library/enum.rst')
-rw-r--r--Doc/library/enum.rst14
1 files changed, 12 insertions, 2 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index e8e49425ab..b354a111a3 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -1125,9 +1125,9 @@ and raise an error if the two do not match::
_Private__names
"""""""""""""""
-Private names will be normal attributes in Python 3.10 instead of either an error
+Private names will be normal attributes in Python 3.11 instead of either an error
or a member (depending on if the name ends with an underscore). Using these names
-in 3.9 will issue a :exc:`DeprecationWarning`.
+in 3.10 will issue a :exc:`DeprecationWarning`.
``Enum`` member type
@@ -1150,6 +1150,10 @@ all-uppercase names for members)::
>>> FieldTypes.size.value
2
+.. note::
+
+ This behavior is deprecated and will be removed in 3.12.
+
.. versionchanged:: 3.5
@@ -1200,3 +1204,9 @@ all named flags and all named combinations of flags that are in the value::
>>> Color(7) # not named combination
<Color.CYAN|MAGENTA|BLUE|YELLOW|GREEN|RED: 7>
+.. note::
+
+ In 3.11 unnamed combinations of flags will only produce the canonical flag
+ members (aka single-value flags). So ``Color(7)`` will produce something
+ like ``<Color.BLUE|GREEN|RED: 7>``.
+