Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ac856e

Browse filesBrowse files
authored
pythongh-104659: Consolidate python examples in enum documentation (python#104665)
1 parent 27a7d5e commit 3ac856e
Copy full SHA for 3ac856e

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed

‎Doc/library/enum.rst

Copy file name to clipboardExpand all lines: Doc/library/enum.rst
+6-6Lines changed: 6 additions & 6 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.