Skip to content

Commit cd13f73

Browse files
hugovktwmr
andauthored
[3.11] gh-104659: Consolidate python examples in enum documentation (#104665) (#104666)
gh-104659: Consolidate python examples in enum documentation (#104665) (cherry picked from commit 3ac856e) Co-authored-by: Thomas Hisch <t.hisch@gmail.com>
1 parent 7b3bc95 commit cd13f73

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Doc/library/enum.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -404,17 +404,18 @@ Data Types
404404
with an *IntEnum* member, the resulting value loses its enumeration status.
405405

406406
>>> from enum import IntEnum
407-
>>> class Numbers(IntEnum):
407+
>>> class Number(IntEnum):
408408
... ONE = 1
409409
... TWO = 2
410410
... THREE = 3
411-
>>> Numbers.THREE
412-
<Numbers.THREE: 3>
413-
>>> Numbers.ONE + Numbers.TWO
411+
...
412+
>>> Number.THREE
413+
<Number.THREE: 3>
414+
>>> Number.ONE + Number.TWO
414415
3
415-
>>> Numbers.THREE + 5
416+
>>> Number.THREE + 5
416417
8
417-
>>> Numbers.THREE == 3
418+
>>> Number.THREE == 3
418419
True
419420

420421
.. note::

0 commit comments

Comments
 (0)