Raymond Hettinger <[email protected]> added the comment:
> For the best of my (limited) knowledge, there's currently
> no arc() function in module turtle.
circle() takes a second argument called "extent":
circle(200, 90) # draw 90° of a circle of radius 200
FWIW, searching the turtle documentation page for "arc" immediately finds the
two argument form of circle, so I don't think there is a discoverability
problem.
Suggestion for Yehuda: Consider driving the turtle module from IPython. It
has an "%autocall" mode that automatically adds parentheses. For example:
forward 100
right 90
gets automatically transformed to:
forward(100)
right(90)
FWIW, I concur with Nick that we shouldn't add a new circle function centered
on the turtle. He was correct that this would make a great exercise. More
importantly, making the module bigger doesn't make it easier to use (see
https://en.wikipedia.org/wiki/Overchoice ). You've already indicated that you
don't yet know the full API and haven't found essential tools like the two
argument form of circle(), so making the API bigger would likely have made the
discoverability problem worse.
At this point, I think we should close this tracker issue:
* It's not easily possible to make "rt" generate an error message
* Circle centered on a turtle is best left as an exercise
* arc() is already present in the two argument form of circle()
One other thought: The Python API was based on other turtle implementations,
so the API is probably mostly already where it should be.
----------
nosy: +rhettinger
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com