File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ are not normal Python classes. See
6464Module Contents
6565---------------
6666
67+ :class: `EnumDict `
68+
69+ An enum class :class: `dict ` that tracks order and enforces unique member names.
70+
6771 :class: `EnumType `
6872
6973 The ``type `` for Enum and its subclasses.
@@ -159,7 +163,21 @@ Data Types
159163----------
160164
161165
162- .. class :: EnumType
166+ .. class :: EnumDict
167+
168+ *EnumDict * is used by *EnumType * to keep track of the enum member orders and prevent reusing the member names.
169+
170+ .. attribute :: EnumDict.member_names
171+
172+ Return list of member names.
173+
174+ .. method :: EnumDict.__setitem__(self, key, value)
175+
176+ Set any item as an enum member that is not dundered and not a descriptor.
177+
178+ .. method :: EnumDict.update(self, members, **more_members)
179+
180+ Update the dictionary from the given iterable or dictionary members and more_members.
163181
164182 *EnumType * is the :term: `metaclass ` for *enum * enumerations. It is possible
165183 to subclass *EnumType * -- see :ref: `Subclassing EnumType <enumtype-examples >`
Original file line number Diff line number Diff line change @@ -742,6 +742,11 @@ email
742742 (Contributed by Thomas Dwyer and Victor Stinner for :gh: `102988 ` to improve
743743 the :cve: `2023-27043 ` fix.)
744744
745+ enum
746+ ----
747+
748+ * :class: `~enum.EnumDict ` has been made public in :mod: `enum `.
749+
745750fractions
746751---------
747752
You can’t perform that action at this time.
0 commit comments