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
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -828,19 +828,21 @@ Data Types
828
828
829
829
.. class:: EnumDict
830
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.
831
+
*EnumDict* is a subclass of :class:`dict` that is used as the namespace
832
+
for defining enum classes (see :ref:`prepare`).
833
+
It is exposed to allow subclasses of :class:`EnumType` with advanced
834
+
behavior like having multiple values per member.
835
+
It prevents reusing member names, with special behavior for names that
836
+
start with an underscore.
837
+
838
+
Note that only the :class:`~collections.abc.MutableMapping` interface
839
+
(:meth:`~object.__setitem__` and :meth:`~dict.update`) is overridden.
840
+
It may be possible to bypass the checks using other :class:`!dict`
0 commit comments