https://github.com/python/cpython/commit/0f175f3e43bd2bbf01fef61ee277b9e9e2c56353
commit: 0f175f3e43bd2bbf01fef61ee277b9e9e2c56353
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2026-08-12T21:28:21+09:00
summary:

[3.15] Docs: simplify `turtle` tutorial's star example code (GH-155232) 
(#155564)

Docs: simplify `turtle` tutorial's star example code (GH-155232)
(cherry picked from commit 7c072c1fcc3c04535dde873a7709781be2794583)

Co-authored-by: Maciej Olko <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/library/turtle.rst

diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst
index d7839e2f81172c5..49099aea4152c14 100644
--- a/Doc/library/turtle.rst
+++ b/Doc/library/turtle.rst
@@ -79,8 +79,8 @@ In a Python shell, import all the objects of the ``turtle`` 
module::
 
     from turtle import *
 
-If you run into a ``No module named '_tkinter'`` error, you'll have to
-install the :mod:`Tk interface package <tkinter>` on your system.
+If you run into a ``Standard library module '_tkinter' was not found`` error,
+you'll have to install the :mod:`Tk interface package <tkinter>` on your 
system.
 
 
 Basic drawing
@@ -167,14 +167,16 @@ filling can be turned on and off::
 
 Next we'll create a loop::
 
+    start = pos()
+
     while True:
         forward(200)
         left(170)
-        if abs(pos()) < 1:
+        if distance(start) < 1:
             break
 
-``abs(pos()) < 1`` is a good way to know when the turtle is back at its
-home position.
+``distance(start) < 1`` is a good way to know when the turtle is back at its
+start position.
 
 Finally, complete the filling::
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to