You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/library/enum.rst
+22-20Lines changed: 22 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,10 +64,6 @@ are not normal Python classes. See
64
64
Module Contents
65
65
---------------
66
66
67
-
:class:`EnumDict`
68
-
69
-
A subclass of :class:`dict` that tracks order and enforces unique member names.
70
-
71
67
:class:`EnumType`
72
68
73
69
The ``type`` for Enum and its subclasses.
@@ -114,6 +110,11 @@ Module Contents
114
110
``KEEP`` which allows for more fine-grained control over how invalid values
115
111
are dealt with in an enumeration.
116
112
113
+
:class:`EnumDict`
114
+
115
+
A subclass of :class:`dict` that tracks order and enforces unique
116
+
member names.
117
+
117
118
:class:`auto`
118
119
119
120
Instances are replaced with an appropriate value for Enum members.
@@ -163,22 +164,6 @@ Data Types
163
164
----------
164
165
165
166
166
-
.. class:: EnumDict
167
-
168
-
*EnumDict* is a subclass of :class:`dict` that keeps track of the order of enum members and prevents reusing member names. Use *EnumDict* when member names must be unique and their order needs to be preserved.
Update the dictionary from the given iterable or dictionary members and more_members.
181
-
182
167
.. class:: EnumType
183
168
184
169
*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible
@@ -841,6 +826,23 @@ Data Types
841
826
842
827
.. versionadded:: 3.11
843
828
829
+
.. class:: EnumDict
830
+
831
+
*EnumDict* is a subclass of :class:`dict` that keeps track of the order of enum members and prevents reusing member names. Use *EnumDict* when member names must be unique and their order needs to be preserved.
0 commit comments