Skip to content

Docs: simplify turtle tutorial's star example code - #155232

Merged
StanFromIreland merged 4 commits into
python:mainfrom
m-aciek:turtle-simplify-star-code
Aug 11, 2026
Merged

Docs: simplify turtle tutorial's star example code#155232
StanFromIreland merged 4 commits into
python:mainfrom
m-aciek:turtle-simplify-star-code

Conversation

@m-aciek

@m-aciek m-aciek commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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)

distance(start) should be easier to understand than counting the length of a vector
@read-the-docs-community

read-the-docs-community Bot commented Aug 5, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34013684 | 📁 Comparing 2b191e2 against main (1d90627)

  🔍 Preview build  

16 files changed · ± 16 modified

± Modified

Comment thread Doc/library/turtle.rst Outdated
Co-authored-by: Stan Ulbrych <stan@python.org>

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one little suggestion for something we can fix while we're here.

Image

Comment thread Doc/library/turtle.rst Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 found

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 👍 , updated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or does it require some generalisation as different environments can have the error message customised? 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Doc/library/turtle.rst Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you wrap the line please.

@StanFromIreland
StanFromIreland merged commit 7c072c1 into python:main Aug 11, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Aug 11, 2026
@StanFromIreland

Copy link
Copy Markdown
Member

Merged, thanks.

@StanFromIreland StanFromIreland added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 11, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @m-aciek for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @m-aciek for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @m-aciek for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

GH-155562 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 11, 2026
@bedevere-app

bedevere-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

GH-155563 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 11, 2026
@bedevere-app

bedevere-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

GH-155564 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 11, 2026
StanFromIreland added a commit that referenced this pull request Aug 11, 2026
… (#155562)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland added a commit that referenced this pull request Aug 11, 2026
… (#155563)

(cherry picked from commit 7c072c1)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
@m-aciek
m-aciek deleted the turtle-simplify-star-code branch August 11, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants