Skip to content

Commit 344a7b5

Browse files
[3.12] Fix print usage in turtle doctests (GH-122940) (#122978)
Fix `print` usage in `turtle` doctests (GH-122940) (cherry picked from commit 901d949) Co-authored-by: sobolevn <[email protected]>
1 parent cd69085 commit 344a7b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/turtle.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ def xcor(self):
17191719
>>> reset()
17201720
>>> turtle.left(60)
17211721
>>> turtle.forward(100)
1722-
>>> print turtle.xcor()
1722+
>>> print(turtle.xcor())
17231723
50.0
17241724
"""
17251725
return self._position[0]
@@ -1733,7 +1733,7 @@ def ycor(self):
17331733
>>> reset()
17341734
>>> turtle.left(60)
17351735
>>> turtle.forward(100)
1736-
>>> print turtle.ycor()
1736+
>>> print(turtle.ycor())
17371737
86.6025403784
17381738
"""
17391739
return self._position[1]
@@ -2336,7 +2336,7 @@ def isvisible(self):
23362336
23372337
Example (for a Turtle instance named turtle):
23382338
>>> turtle.hideturtle()
2339-
>>> print turtle.isvisible():
2339+
>>> print(turtle.isvisible())
23402340
False
23412341
"""
23422342
return self._shown

0 commit comments

Comments
 (0)