random.choice(list(<enum_name>)) # == random <enum>
# Functions can not be values, so they must be enclosed in tuple:
LogicOp = Enum('LogicOp', {'AND': (lambda l, r: l and r, ),
'OR' : (lambda l, r: l or r, ),
list(<enum_name>) # == [<enum1>, <enum2>, ...]
list(a.name for a in <enum_name>) # == ['enum1', 'enum2', ...]
random.choice(list(<enum_name>)) # == random <enum>
```
### Copy
@ -803,7 +809,7 @@ from itertools import *
```
### Ifilter, imap and izip
#### Filter, map and zip functions that return generators instead of iterators.
#### Filter, map and zip functions that return generators instead of iterators. Droped in Pyhon 3, because filter, map and zip functions started returning generators.