File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -509,21 +509,19 @@ Data Types
509
509
of any string operation performed on or with a *StrEnum * member is not part
510
510
of the enumeration.
511
511
512
- >>> from enum import StrEnum
513
- >>> class Color(StrEnum):
514
- ... RED = 'r'
515
- ... GREEN = 'g'
516
- ... BLUE = 'b'
517
- ... UNKNOWN = auto()
518
- ...
519
- >>> Color.RED
520
- <Color.RED: 'r'>
521
- >>> str(Color.RED)
522
- 'r'
523
- >>> Color.UNKNOWN
524
- <Color.UNKNOWN: 'unknown'>
525
- >>> str(Color.UNKNOWN)
526
- 'unknown'
512
+ >>> from enum import StrEnum, auto
513
+ >>> class Color (StrEnum ):
514
+ ... RED = ' r'
515
+ ... GREEN = ' g'
516
+ ... BLUE = ' b'
517
+ ... UNKNOWN = auto()
518
+ ...
519
+ >>> Color.RED
520
+ <Color.RED: 'r'>
521
+ >>> Color.UNKNOWN
522
+ <Color.UNKNOWN: 'unknown'>
523
+ >>> str (Color.UNKNOWN )
524
+ 'unknown'
527
525
528
526
.. note ::
529
527
You can’t perform that action at this time.
0 commit comments