Browse Source

Enum

pull/3/head
Jure Šorn 6 years ago
parent
commit
e16184679e
1 changed files with 1 additions and 0 deletions
  1. 1
      README.md

1
README.md

@ -505,6 +505,7 @@ list(a.name for a in <enum_name>) # == ['enum1', 'enum2', ...]
random.choice(list(<enum_name>)) # == random <enum>
```
#### Inline:
```python
Cutlery = Enum('Cutlery', ['knife', 'fork', 'spoon'])
Cutlery = Enum('Cutlery', 'knife fork spoon')

Loading…
Cancel
Save