Skip to content

Commit 5a4d3df

Browse files
authored
Fix note in Enum.__new__ docs (#118284)
1 parent 463c20d commit 5a4d3df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/enum.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Data Types
279279
>>> Color.RED.value
280280
1
281281

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

284284
.. note:: Enum member values
285285

@@ -299,7 +299,7 @@ Data Types
299299

300300
.. attribute:: Enum._value_
301301

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

304304
.. attribute:: Enum._order_
305305

@@ -407,8 +407,8 @@ Data Types
407407

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

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

413413
.. method:: Enum.__repr__(self)
414414

@@ -827,7 +827,7 @@ Supported ``__dunder__`` names
827827
:attr:`~EnumType.__members__` is a read-only ordered mapping of ``member_name``:``member``
828828
items. It is only available on the class.
829829

830-
:meth:`~object.__new__`, if specified, must create and return the enum members;
830+
:meth:`~Enum.__new__`, if specified, must create and return the enum members;
831831
it is also a very good idea to set the member's :attr:`!_value_` appropriately.
832832
Once all the members are created it is no longer used.
833833

0 commit comments

Comments
 (0)