Skip to content

Commit 5613daf

Browse files
authored
Merge pull request realpython#897 from cclauss/patch-2
print() function in gotchas.rst
2 parents c93a09b + cf98034 commit 5613daf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/writing/gotchas.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ What You Might Have Expected to Happen
3737
.. code-block:: python
3838
3939
my_list = append_to(12)
40-
print my_list
40+
print(my_list)
4141
4242
my_other_list = append_to(42)
43-
print my_other_list
43+
print(my_other_list)
4444
4545
A new list is created each time the function is called if a second argument
4646
isn't provided, so that the output is::
@@ -108,7 +108,7 @@ What You Might Have Expected to Happen
108108
.. testcode::
109109

110110
for multiplier in create_multipliers():
111-
print multiplier(2)
111+
print(multiplier(2))
112112

113113
A list containing five functions that each have their own closed-over ``i``
114114
variable that multiplies their argument, producing::

0 commit comments

Comments
 (0)