Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 901d949

Browse filesBrowse files
authored
Fix print usage in turtle doctests (#122940)
1 parent 906b796 commit 901d949
Copy full SHA for 901d949

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎Lib/turtle.py

Copy file name to clipboardExpand all lines: Lib/turtle.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ def xcor(self):
17181718
>>> reset()
17191719
>>> turtle.left(60)
17201720
>>> turtle.forward(100)
1721-
>>> print turtle.xcor()
1721+
>>> print(turtle.xcor())
17221722
50.0
17231723
"""
17241724
return self._position[0]
@@ -1732,7 +1732,7 @@ def ycor(self):
17321732
>>> reset()
17331733
>>> turtle.left(60)
17341734
>>> turtle.forward(100)
1735-
>>> print turtle.ycor()
1735+
>>> print(turtle.ycor())
17361736
86.6025403784
17371737
"""
17381738
return self._position[1]
@@ -2335,7 +2335,7 @@ def isvisible(self):
23352335
23362336
Example (for a Turtle instance named turtle):
23372337
>>> turtle.hideturtle()
2338-
>>> print turtle.isvisible():
2338+
>>> print(turtle.isvisible())
23392339
False
23402340
"""
23412341
return self._shown

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.