Skip to content

Commit ed9ceea

Browse files
committed
Closure
1 parent bf479ad commit ed9ceea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,14 @@ def get_multiplier(a):
532532
#### Or:
533533
```python
534534
from functools import partial
535-
partial(<function>, <arg_1> [, <arg_2>, ...])
535+
<function> = partial(<function>, <arg_1> [, <arg_2>, ...])
536+
```
537+
538+
```python
539+
>>> from operator import mul
540+
>>> multiply_by_3 = partial(mul, 3)
541+
>>> multiply_by_3(10)
542+
30
536543
```
537544

538545

0 commit comments

Comments
 (0)