From e452f0f8087f6759c8a7de7b4319b2e9fd53db0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 27 Jan 2019 10:15:58 +0100 Subject: [PATCH] Inline --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 877a18c..c0e9187 100644 --- a/README.md +++ b/README.md @@ -528,15 +528,15 @@ from functools import reduce ### Namedtuple, Enum, Class ```python from collections import namedtuple -Point = namedtuple('Point', 'x y') +Point = namedtuple('Point', 'x y') from enum import Enum Direction = Enum('Direction', 'n e s w') Cutlery = Enum('Cutlery', {'knife': 1, 'fork': 2, 'spoon': 3}) # Warning: Objects will share the objects that are initialized in the dictionary! -Creature = type('Creature', (), {'p': Point(0, 0), 'd': Direction.n}) -creature = Creature() +Creature = type('Creature', (), {'p': Point(0, 0), 'd': Direction.n}) +creature = Creature() ```