Skip to content

Commit

Permalink
gh-104659: Consolidate python examples in enum documentation (#104665)
Browse files Browse the repository at this point in the history
  • Loading branch information
twmr committed May 19, 2023
1 parent 27a7d5e commit 3ac856e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,18 @@ Data Types
with an *IntEnum* member, the resulting value loses its enumeration status.

>>> from enum import IntEnum
>>> class Numbers(IntEnum):
>>> class Number(IntEnum):
... ONE = 1
... TWO = 2
... THREE = 3
...
>>> Numbers.THREE
<Numbers.THREE: 3>
>>> Numbers.ONE + Numbers.TWO
>>> Number.THREE
<Number.THREE: 3>
>>> Number.ONE + Number.TWO
3
>>> Numbers.THREE + 5
>>> Number.THREE + 5
8
>>> Numbers.THREE == 3
>>> Number.THREE == 3
True

.. note::
Expand Down

0 comments on commit 3ac856e

Please sign in to comment.