Skip to content

Commit 3ac856e

Browse files
authored
gh-104659: Consolidate python examples in enum documentation (#104665)
1 parent 27a7d5e commit 3ac856e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Doc/library/enum.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -406,18 +406,18 @@ Data Types
406406
with an *IntEnum* member, the resulting value loses its enumeration status.
407407

408408
>>> from enum import IntEnum
409-
>>> class Numbers(IntEnum):
409+
>>> class Number(IntEnum):
410410
... ONE = 1
411411
... TWO = 2
412412
... THREE = 3
413413
...
414-
>>> Numbers.THREE
415-
<Numbers.THREE: 3>
416-
>>> Numbers.ONE + Numbers.TWO
414+
>>> Number.THREE
415+
<Number.THREE: 3>
416+
>>> Number.ONE + Number.TWO
417417
3
418-
>>> Numbers.THREE + 5
418+
>>> Number.THREE + 5
419419
8
420-
>>> Numbers.THREE == 3
420+
>>> Number.THREE == 3
421421
True
422422

423423
.. note::

0 commit comments

Comments
 (0)