python / python/cpython

Doc: Clarify doc about turtle.reset() and angle measurement unit

Open
#138,845 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs topic-tkinter
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Documentation

The turtle module has a couple of functions that could cause misconceptions about the reset function and angle measurement unit.

turtle.reset():

Delete the turtle’s drawings from the screen, re-center the turtle and set variables to the default values.
  1. Re-center is not always true. It depends on the turtle mode. I think the right thing to say is something like "send the turtle to the (0, 0) position".
  2. What variables?

turtle.left()/rigth():

Turn turtle left/rigth by angle units. (Units are by default degrees, but can be set via the [degrees()](https://docs.python.org/3/library/turtle.html#turtle.degrees) and [radians()](https://docs.python.org/3/library/turtle.html#turtle.radians) functions.) Angle orientation depends on the turtle mode, see [mode()](https://docs.python.org/3/library/turtle.html#turtle.mode).

It is said that the unit defaults are degrees. But if we run turtle.radians() and after turtle.reset(), the unit doesn't change to degrees.

turtle.degrees(fullcircle=360.0)

Set angle measurement units, i.e. set number of “degrees” for a full circle. Default value is 360 degrees.

turtle.radians()

Set the angle measurement units to radians. Equivalent to degrees(2*math.pi).

These two last functions say nothing about the default unit. (and missing a "See also" in each)

Linked PRs
  • gh-138879
  • gh-138882

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the turtle module documentation and review the entries for reset(), left()/right(), degrees(), radians(), and mode(). Clarify reset() behavior and angle-unit defaults, explain which variables are reset, and add the missing See also references; the linked PRs indicate this work may already be underway.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.