diff --git a/README.md b/README.md index d93636f..a2532f6 100644 --- a/README.md +++ b/README.md @@ -852,8 +852,9 @@ from functools import partial ``` ```python ->>> import operator as op ->>> multiply_by_3 = partial(op.mul, 3) +>>> def multiply(a, b): +... return a * b +>>> multiply_by_3 = partial(multiply, 3) >>> multiply_by_3(10) 30 ``` diff --git a/index.html b/index.html index 4a28299..5703327 100644 --- a/index.html +++ b/index.html @@ -723,8 +723,9 @@ player = Player(point, direction) # <function> = partial(<function> [, <arg_1>, <arg_2>, ...]) -
>>> import operator as op
->>> multiply_by_3 = partial(op.mul, 3)
+
>>> def multiply(a, b):
+...     return a * b
+>>> multiply_by_3 = partial(multiply, 3)
 >>> multiply_by_3(10)
 30