Skip to content

Commit

Permalink
gh-112328: Document EnumDict in docs and release notes (GH-121720)
Browse files Browse the repository at this point in the history
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
  • Loading branch information
3 people authored Dec 19, 2024
1 parent c14db20 commit 39e69a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,14 @@ Module Contents

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

:class:`EnumDict`

A subclass of :class:`dict` for use when subclassing :class:`EnumType`.


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

---------------

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

.. versionadded:: 3.11
.. versionadded:: 3.11

.. class:: EnumDict

*EnumDict* is a subclass of :class:`dict` for use when subclassing :class:`EnumType`.

.. attribute:: EnumDict.member_names

Return list of member names.

.. versionadded:: 3.14

---------------

Expand Down
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,11 @@ email
(Contributed by Thomas Dwyer and Victor Stinner for :gh:`102988` to improve
the :cve:`2023-27043` fix.)

enum
----

* :class:`~enum.EnumDict` has been made public in :mod:`enum` to better support
subclassing :class:`~enum.EnumType`.

fractions
---------
Expand Down

0 comments on commit 39e69a7

Please sign in to comment.