From 46ab1ee37c86cc78254052b99735d27f4c782b7e Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Wed, 5 Aug 2026 13:00:30 +0200 Subject: [PATCH 1/3] Docs: simplify turtle tutorial's star example code distance(start) should be easier to understand than counting the length of a vector --- Doc/library/turtle.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index d7839e2f81172c5..c2588e5f9a52833 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -167,13 +167,15 @@ 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 +``distance(start) < 1`` is a good way to know when the turtle is back at its home position. Finally, complete the filling:: From 0b4d38d61d50213d1d7f1f06aabeba04fc86fa8c Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Thu, 6 Aug 2026 00:20:00 +0200 Subject: [PATCH 2/3] Apply suggestion from @StanFromIreland Co-authored-by: Stan Ulbrych --- Doc/library/turtle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index c2588e5f9a52833..97f09f19656da3e 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -176,7 +176,7 @@ Next we'll create a loop:: break ``distance(start) < 1`` is a good way to know when the turtle is back at its -home position. +start position. Finally, complete the filling:: From 471221bf29ece05f3c5950353af53e8f22a9d0f1 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Mon, 10 Aug 2026 10:50:22 +0200 Subject: [PATCH 3/3] Update error message in environment docs for Python 3.15+ --- Doc/library/turtle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 97f09f19656da3e..c4d0ca285a1ac4e 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -79,7 +79,7 @@ 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 +If you run into a ``Standard library module '_tkinter' was not found`` error, you'll have to install the :mod:`Tk interface package ` on your system.