Skip to content

Commit 9c87b55

Browse files
u2rafiwebknjazethanfurman
authored andcommitted
pythongh-112328: Document EnumDict in docs and release notes (pythonGH-121720)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: Ethan Furman <[email protected]>
1 parent 356306e commit 9c87b55

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Doc/library/enum.rst

+16-1
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,14 @@ Module Contents
149149

150150
Return a list of all power-of-two integers contained in a flag.
151151

152+
:class:`EnumDict`
153+
154+
A subclass of :class:`dict` for use when subclassing :class:`EnumType`.
155+
152156

153157
.. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto``
154158
.. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, ``member``, ``nonmember``, ``global_enum``, ``show_flag_values``
159+
.. versionadded:: 3.14 ``EnumDict``
155160

156161
---------------
157162

@@ -821,7 +826,17 @@ Data Types
821826
>>> KeepFlag(2**2 + 2**4)
822827
<KeepFlag.BLUE|16: 20>
823828

824-
.. versionadded:: 3.11
829+
.. versionadded:: 3.11
830+
831+
.. class:: EnumDict
832+
833+
*EnumDict* is a subclass of :class:`dict` for use when subclassing :class:`EnumType`.
834+
835+
.. attribute:: EnumDict.member_names
836+
837+
Return list of member names.
838+
839+
.. versionadded:: 3.14
825840

826841
---------------
827842

Doc/whatsnew/3.13.rst

+5
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,11 @@ email
879879
(Contributed by Thomas Dwyer and Victor Stinner for :gh:`102988` to improve
880880
the :cve:`2023-27043` fix.)
881881

882+
enum
883+
----
884+
885+
* :class:`~enum.EnumDict` has been made public in :mod:`enum` to better support
886+
subclassing :class:`~enum.EnumType`.
882887

883888
fractions
884889
---------

0 commit comments

Comments
 (0)