Skip to content

Commit aabd2c1

Browse files
committed
Closure
1 parent 7475b3a commit aabd2c1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,19 +489,18 @@ creature = Creature()
489489
Closure
490490
-------
491491
```python
492-
def multiply_closure(a):
492+
def get_multiplier(a):
493493
def out(b):
494494
return a * b
495495
return out
496496
```
497497

498498
```python
499-
>>> multiply_by_3 = multiply_closure(3)
499+
>>> multiply_by_3 = get_multiplier(3)
500500
>>> multiply_by_3(10)
501501
30
502502
```
503503

504-
505504
#### Or:
506505
```python
507506
from functools import partial

0 commit comments

Comments
 (0)