Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@adorilson

Description

@adorilson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    No status

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions