Skip to content

gh-157847: Re-write more of the turtle reference docs - #159685

Open
StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:turtle/another-round
Open

StanFromIreland wants to merge 1 commit into
python:mainfrom
StanFromIreland:turtle/another-round

Conversation

@StanFromIreland

Copy link
Copy Markdown
Member

No description provided.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35226943 | 📁 Comparing eff9d13 against main (7dbc797)

  🔍 Preview build  

1 file changed
± library/turtle.html

@willingc willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice cleanup @StanFromIreland. A few suggestions for readability for children and young adults. Fine to ship as is too.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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`.

Comment thread Doc/library/turtle.rst

Automatically begin and end filling
-----------------------------------
How to automatically begin and end filling

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fill? instead of filling

Comment thread Lib/turtle.py

def pensize(self, width=None):
"""Set or return the line thickness.
"""Set the line thickness to width or return it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"""Set the line thickness to width or return it.
"""Set the line thickness width or return it.

Comment thread Lib/turtle.py
9
"""
speeds = {'fastest':0, 'fast':10, 'normal':6, 'slow':3, 'slowest':1 }
speed_strings = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason to name it speed_strings vs. speeds?

Comment thread Lib/turtle.py

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like teleport a bit more than instantly move. Teleport, or instantly move, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants