Browse Source

Bla

pull/3/head
Jure Šorn 6 years ago
parent
commit
8dcec4e5a1
1 changed files with 8 additions and 2 deletions
  1. 10
      README.md

10
README.md

@ -490,9 +490,9 @@ Closure
------- -------
```python ```python
def multiply_closure(a): def multiply_closure(a):
def wrapped(b):
def out(b):
return a * b return a * b
return wrapped
return out
``` ```
```python ```python
@ -508,6 +508,12 @@ from functools import partial
partial(<function>, <arg_1> [, <arg_2>, ...]) partial(<function>, <arg_1> [, <arg_2>, ...])
``` ```
```python
>>> multiply_by_3 = partial(lambda a, b: a*b, 3)
>>> multiply_by_3(10)
30
```
Decorator Decorator
--------- ---------

Loading…
Cancel
Save