-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
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.
- 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".
- 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
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
No status
Status
Todo