Skip to content

Commit 6c75719

Browse files
committed
Add version changed indicators to Enum members
The Enum members listed in the sections of `__dunder__` and `_sunder_` did not have version indicators in the API docs. This changes adds the version indicators mentioned in the `__dunder__` and `_sunder_` section to the corresponding Enum member.
1 parent 706ad60 commit 6c75719

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/library/enum.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ Data Types
321321
In Python 2 code the :attr:`~Enum._order_` attribute is necessary as definition
322322
order is lost before it can be recorded.
323323

324+
.. versionadded:: 3.6
325+
324326
.. attribute:: Enum._ignore_
325327

326328
``_ignore_`` is only used during creation and is removed from the
@@ -330,6 +332,8 @@ Data Types
330332
names will also be removed from the completed enumeration. See
331333
:ref:`TimePeriod <enum-time-period>` for an example.
332334

335+
.. versionadded:: 3.7
336+
333337
.. method:: Enum.__dir__(self)
334338

335339
Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and
@@ -372,6 +376,10 @@ Data Types
372376
>>> PowersOfThree.SECOND.value
373377
9
374378

379+
.. versionadded:: 3.6
380+
.. versionchanged:: 3.13
381+
Prior versions would use the last seen value instead of the highest value.
382+
375383
.. method:: Enum.__init__(self, *args, **kwds)
376384

377385
By default, does nothing. If multiple values are given in the member
@@ -410,6 +418,8 @@ Data Types
410418
>>> Build('deBUG')
411419
<Build.DEBUG: 'debug'>
412420

421+
.. versionadded:: 3.6
422+
413423
.. method:: Enum.__new__(cls, *args, **kwds)
414424

415425
By default, doesn't exist. If specified, either in the enum class

0 commit comments

Comments
 (0)