Skip to content

Commit e3d3f23

Browse files
committed
Enum
1 parent 25ed221 commit e3d3f23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,13 @@ Cutlery = Enum('Cutlery', 'knife fork spoon')
805805
Cutlery = Enum('Cutlery', {'knife': 1, 'fork': 2, 'spoon': 3})
806806
```
807807

808+
#### Functions can not be values, so they must be wrapped:
808809
```python
809810
from functools import partial
810811
LogicOp = Enum('LogicOp', {'AND': partial(lambda l, r: l and r),
811812
'OR' : partial(lambda l, r: l or r)})
812813
```
813814

814-
* **Functions can not be values, so they must be wrapped.**
815815

816816
System
817817
------

0 commit comments

Comments
 (0)