Doc: Clarify doc about turtle.reset() and angle measurement unit
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
- gh-138879
- gh-138882
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit der Dokumentation des turtle-Moduls und überprüfen Sie die Einträge für reset(), left()/right(), degrees(), radians() und mode(). Klären Sie das Verhalten von reset() und die Standardwerte der Winkeleinheiten, erläutern Sie, welche Variablen zurückgesetzt werden, und fügen Sie die fehlenden See also-Verweise hinzu; die verknüpften PRs deuten darauf hin, dass diese Arbeit möglicherweise bereits im Gange ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100