Skip to content

Commit

Permalink
[3.12] Fix note in Enum.__new__ docs (pythonGH-118284)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5a4d3df)

Co-authored-by: Philipp A <[email protected]>
  • Loading branch information
flying-sheep authored and JelleZijlstra committed Apr 26, 2024
1 parent db47460 commit de2393a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Data Types
>>> Color.RED.value
1

Value of the member, can be set in :meth:`~object.__new__`.
Value of the member, can be set in :meth:`~Enum.__new__`.

.. note:: Enum member values

Expand All @@ -289,7 +289,7 @@ Data Types

.. attribute:: Enum._value_

Value of the member, can be set in :meth:`~object.__new__`.
Value of the member, can be set in :meth:`~Enum.__new__`.

.. attribute:: Enum._order_

Expand Down Expand Up @@ -397,8 +397,8 @@ Data Types

results in the call ``int('1a', 16)`` and a value of ``17`` for the member.

..note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
call the appropriate ``__new__`` instead.
.. note:: When writing a custom ``__new__``, do not use ``super().__new__`` --
call the appropriate ``__new__`` instead.

.. method:: Enum.__repr__(self)

Expand Down

0 comments on commit de2393a

Please sign in to comment.