Docs: simplify turtle tutorial's star example code - #155232
Conversation
distance(start) should be easier to understand than counting the length of a vector
Documentation build overview
16 files changed ·
|
Co-authored-by: Stan Ulbrych <stan@python.org>
There was a problem hiding this comment.
Can you please update this error message, on 3.15 we have:
>>> from turtle import *
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
from turtle import *
File "/home/stan/dev/cpython/Lib/turtle.py", line 101, in <module>
import tkinter as TK
File "/home/stan/dev/cpython/Lib/tkinter/__init__.py", line 38, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: Standard library module '_tkinter' was not foundThere was a problem hiding this comment.
Or does it require some generalisation as different environments can have the error message customised? 🤔
There was a problem hiding this comment.
Or does it require some generalisation as different environments can have the error message customised?
In that case, it will hopefully be more helpful and will include instructions.
| 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 |
There was a problem hiding this comment.
Can you wrap the line please.
|
Merged, thanks. |
|
Thanks @m-aciek for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @m-aciek for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @m-aciek for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-155562 is a backport of this pull request to the 3.13 branch. |
|
GH-155563 is a backport of this pull request to the 3.14 branch. |
|
GH-155564 is a backport of this pull request to the 3.15 branch. |
… (#155562) Co-authored-by: Maciej Olko <maciej.olko@affirm.com> Co-authored-by: Stan Ulbrych <stan@python.org>

distance(start)should be easier to understand for students than counting the length of the position vector.The changed code is equivalent to the original, doesn't change the drawing.
cc @evildmp (author of the docs fragment)