diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2023-05-06 15:04:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-06 15:04:41 (GMT) |
commit | e407661e7a70ad49a69df3058634bc4fccebbcd6 (patch) | |
tree | 6b4fbf6421744ed694ccffe673b4fa166d288f7a /Misc/NEWS.d | |
parent | 6616710731b9ad1a4e6b73696e8bd5c40cf8762d (diff) | |
download | cpython-e407661e7a70ad49a69df3058634bc4fccebbcd6.zip cpython-e407661e7a70ad49a69df3058634bc4fccebbcd6.tar.gz cpython-e407661e7a70ad49a69df3058634bc4fccebbcd6.tar.bz2 |
gh-65772: Clean-up turtle module (#104218)
* Remove the unused, private, and undocumented name `_ver` and
the commented-out `print` call.
* Don't add math functions to `__all__`. Beginners should learn
to `import math` to access them.
* Gregor Lindel, who wrote this version of turtle, dropped plans
to implement turtle on another toolkit at least a decade ago.
Drop `_dot` code preparing for this, but add a hint comment.
* `_Screen` is meant to be a singleton class. To enforce that,
it needs either a `__new__` that returns the singleton or
`else...raise` in `__iter__`. Merely removing the `if` clauses
as suggested might break something if a user were to call `_Screen`
directly. Leave the code alone until a problem is evident.
* Turtledemo injects into _Screen both _root and _canvas,
configured as it needs them to be. Making _canvas an `__init__`
option would require skipping some but not all of the lines under
'if _Screen._canvas is None:`. Leave working code alone.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-05-05-18-52-22.gh-issue-65772.w5P5Wv.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-05-05-18-52-22.gh-issue-65772.w5P5Wv.rst b/Misc/NEWS.d/next/Library/2023-05-05-18-52-22.gh-issue-65772.w5P5Wv.rst new file mode 100644 index 0000000..54b0190 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-05-05-18-52-22.gh-issue-65772.w5P5Wv.rst @@ -0,0 +1 @@ +Remove unneeded comments and code in turtle.py. |