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.
2 parents c93a09b + cf98034 commit 5613dafCopy full SHA for 5613daf
docs/writing/gotchas.rst
@@ -37,10 +37,10 @@ What You Might Have Expected to Happen
37
.. code-block:: python
38
39
my_list = append_to(12)
40
- print my_list
+ print(my_list)
41
42
my_other_list = append_to(42)
43
- print my_other_list
+ print(my_other_list)
44
45
A new list is created each time the function is called if a second argument
46
isn't provided, so that the output is::
@@ -108,7 +108,7 @@ What You Might Have Expected to Happen
108
.. testcode::
109
110
for multiplier in create_multipliers():
111
- print multiplier(2)
+ print(multiplier(2))
112
113
A list containing five functions that each have their own closed-over ``i``
114
variable that multiplies their argument, producing::
0 commit comments