Repository navigation
gh-157847: Re-write more of the turtle reference docs - #159685
Open
StanFromIreland wants to merge 1 commit into
Open
StanFromIreland wants to merge 1 commit into
StanFromIreland wants to merge 1 commit into
Conversation
Documentation build overview
|
willingc
approved these changes
Oct 18, 2026
willingc
left a comment
Contributor
There was a problem hiding this comment.
Nice cleanup @StanFromIreland. A few suggestions for readability for children and young adults. Fine to ship as is too.
Comment on lines
+359
to
+366
| Instantly move the turtle to an absolute position. Unlike :func:`goto`, no | ||
| line is drawn. If *x* or *y* is not given, that coordinate is kept as it | ||
| is. The turtle's heading does not change. | ||
|
|
||
| If the turtle is filling a shape, the shape drawn so far is finished and | ||
| filled before the jump, and filling starts again at the new position. Pass | ||
| ``fill_gap=True`` to keep filling one shape instead. The jump then counts | ||
| as an edge of the shape, as it would with :func:`goto`. |
Contributor
There was a problem hiding this comment.
Let's try to be consistent with wording: teleport, jump, or move instantly. These docs will likely be used by a variety of ages so consistency is helpful.
Comment on lines
+1204
to
+1208
| Set the turtle shape to the shape with the given *name*. If *name* is not | ||
| given, return the name of the current shape. The shape must exist in the | ||
| :class:`TurtleScreen`'s shape dictionary. Initially there are the following | ||
| polygon shapes: "arrow", "turtle", "circle", "square", "triangle" and | ||
| "classic". To add shapes, see the :class:`Screen` method :func:`register_shape`. |
Contributor
There was a problem hiding this comment.
Suggested change
| Set the turtle shape to the shape with the given *name*. If *name* is not | |
| given, return the name of the current shape. The shape must exist in the | |
| :class:`TurtleScreen`'s shape dictionary. Initially there are the following | |
| polygon shapes: "arrow", "turtle", "circle", "square", "triangle" and | |
| "classic". To add shapes, see the :class:`Screen` method :func:`register_shape`. | |
| Set the turtle shape to the named shape. If *name* is not | |
| given, return the name of the current shape. The shape must exist in the | |
| :class:`TurtleScreen`'s shape dictionary. Initially there are the following | |
| shapes: "arrow", "turtle", "circle", "square", "triangle" and | |
| "classic". To add shapes, see the :class:`Screen` method :func:`register_shape`. |
|
|
||
| Automatically begin and end filling | ||
| ----------------------------------- | ||
| How to automatically begin and end filling |
|
|
||
| def pensize(self, width=None): | ||
| """Set or return the line thickness. | ||
| """Set the line thickness to width or return it. |
Contributor
There was a problem hiding this comment.
Suggested change
| """Set the line thickness to width or return it. | |
| """Set the line thickness width or return it. |
| 9 | ||
| """ | ||
| speeds = {'fastest':0, 'fast':10, 'normal':6, 'slow':3, 'slowest':1 } | ||
| speed_strings = { |
Contributor
There was a problem hiding this comment.
Is there a reason to name it speed_strings vs. speeds?
|
|
||
| def teleport(self, x=None, y=None, *, fill_gap: bool = False) -> None: | ||
| """Instantly move turtle to an absolute position. | ||
| """Instantly move the turtle to an absolute position. |
Contributor
There was a problem hiding this comment.
I like teleport a bit more than instantly move. Teleport, or instantly move, ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.