Doc: Clarify doc about turtle.reset() and angle measurement unit
未关闭
还没有人认领这个 Issue。
docs
topic-tkinter
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 turtle 模块文档开始,检查 reset()、left()/right()、degrees()、radians() 和 mode() 的条目。明确 reset() 的行为和角度单位的默认值,说明哪些变量会被重置,并添加缺失的 See also 引用;链接的 PRs 表明这项工作可能已经在进行中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100