We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49f82b4 commit 8496d65Copy full SHA for 8496d65
README.md
@@ -489,14 +489,19 @@ creature = Creature()
489
Closure
490
-------
491
```python
492
-def multiply_closure(x):
493
- def wrapped(y):
494
- return x * y
495
- return wrapped
+def multiply_closure(a):
+ def wrapped(b):
+ return a * b
+ return wrapped
496
+```
497
-multiply_by_3 = multiply_closure(3)
498
+```python
499
+>>> multiply_by_3 = multiply_closure(3)
500
+>>> multiply_by_3(10)
501
+30
502
```
503
504
+
505
#### Or:
506
507
from functools import partial
0 commit comments