From 25ed221c74d0db27e2a54d46c2bbb2bb2c0f9982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 29 Jan 2019 20:31:24 +0100 Subject: [PATCH] Enum --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e09a3f..c52d9fd 100644 --- a/README.md +++ b/README.md @@ -805,13 +805,13 @@ Cutlery = Enum('Cutlery', 'knife fork spoon') Cutlery = Enum('Cutlery', {'knife': 1, 'fork': 2, 'spoon': 3}) ``` -#### Functions can not be values, so they must be wrapped: ```python from functools import partial LogicOp = Enum('LogicOp', {'AND': partial(lambda l, r: l and r), 'OR' : partial(lambda l, r: l or r)}) ``` +* **Functions can not be values, so they must be wrapped.** System ------