]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix `print` usage in `turtle` doctests (#122940)
authorsobolevn <mail@sobolevn.me>
Tue, 13 Aug 2024 16:39:12 +0000 (19:39 +0300)
committerGitHub <noreply@github.com>
Tue, 13 Aug 2024 16:39:12 +0000 (19:39 +0300)
Lib/turtle.py

index 7bfe81351b0b344bbd6311c4e71199f4ff8e42ea..99850ae5efe348a6e3ce1f23aca7016c0288b918 100644 (file)
@@ -1718,7 +1718,7 @@ class TNavigator(object):
         >>> reset()
         >>> turtle.left(60)
         >>> turtle.forward(100)
-        >>> print turtle.xcor()
+        >>> print(turtle.xcor())
         50.0
         """
         return self._position[0]
@@ -1732,7 +1732,7 @@ class TNavigator(object):
         >>> reset()
         >>> turtle.left(60)
         >>> turtle.forward(100)
-        >>> print turtle.ycor()
+        >>> print(turtle.ycor())
         86.6025403784
         """
         return self._position[1]
@@ -2335,7 +2335,7 @@ class TPen(object):
 
         Example (for a Turtle instance named turtle):
         >>> turtle.hideturtle()
-        >>> print turtle.isvisible():
+        >>> print(turtle.isvisible())
         False
         """
         return self._shown