From 62e51d0fa2180af6d205a9520d15d07a64db6e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 14 Mar 2018 17:41:58 +0100 Subject: [PATCH] Update --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 598cbc7..d2b082a 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Range ```python range(to_exclusive) range(from_inclusive, to_exclusive) -range(from_inclusive, to_exclusive, step_size) # Negative step_size for backward +range(from_inclusive, to_exclusive, step_size) # Negative step_size for backward. ``` Enumerate @@ -263,7 +263,8 @@ def multiply_closure(x): def wrapped(y): return x * y return wrapped - +``` +```python multiply_by_3 = multiply_closure(3) ``` @@ -444,7 +445,7 @@ import threading ### Thread ```python -thread = threading.Thread(target=, args=(, )) +thread = threading.Thread(target=, args=(, )) thread.start() thread.join() ``` @@ -588,14 +589,14 @@ type(class_name, parents, attributes) #### Classes that create classes. ```python def my_meta_class(name, parents, attrs): - # do stuff + ... return type(name, parents, attrs) ``` ##### or ```python class MyMetaClass(type): def __new__(klass, name, parents, attrs): - # do stuff + ... return type.__new__(klass, name, parents, attrs) ```