Skip to content

Commit 05ea9bd

Browse files
committed
Put EnumDict docs on the buttom to de-emphasize the class
1 parent e8c368e commit 05ea9bd

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

Doc/library/enum.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ are not normal Python classes. See
6464
Module Contents
6565
---------------
6666

67-
:class:`EnumDict`
68-
69-
A subclass of :class:`dict` that tracks order and enforces unique member names.
70-
7167
:class:`EnumType`
7268

7369
The ``type`` for Enum and its subclasses.
@@ -114,6 +110,11 @@ Module Contents
114110
``KEEP`` which allows for more fine-grained control over how invalid values
115111
are dealt with in an enumeration.
116112

113+
:class:`EnumDict`
114+
115+
A subclass of :class:`dict` that tracks order and enforces unique
116+
member names.
117+
117118
:class:`auto`
118119

119120
Instances are replaced with an appropriate value for Enum members.
@@ -163,22 +164,6 @@ Data Types
163164
----------
164165

165166

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.
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.
181-
182167
.. class:: EnumType
183168

184169
*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible
@@ -841,6 +826,23 @@ Data Types
841826

842827
.. versionadded:: 3.11
843828

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.
832+
833+
.. attribute:: EnumDict.member_names
834+
835+
Return list of member names.
836+
837+
.. method:: EnumDict.__setitem__(self, key, value)
838+
839+
Set any item as an enum member that is not dundered and not a descriptor.
840+
841+
.. method:: EnumDict.update(self, members, **more_members)
842+
843+
Update the dictionary from the given iterable or dictionary members and more_members.
844+
845+
844846
---------------
845847

846848
Supported ``__dunder__`` names

0 commit comments

Comments
 (0)