-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Make turtle.pensize smarter #133244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a backwards compatibility concern, since currently values less than one are accepted, even though they are equivalent to 1. This should be a separate feature issue. |
the thing is that anyone who uses negative values still gets an error, just in a different place. it's unlikely that anyone calls maybe wait to see what @willingc as a turtle expert says I would also like to note that other methods expect positive numbers arguments: and Lines 2913 to 2914 in ad2f088
|
…h a negative number
In fact, if it is |
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Proposal:
The turtle.pensize doc says:
However, if you put a non-positive number, the function will accept it without any error or warning.
Afterwards, a draw action (like forward) will raise an exception. See below.
My suggestion is
pensize
(and probably others) raises aTurtleGraphicsError
if thewidth
argument is less than 1.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
https://discuss.python.org/t/improving-the-turtle-library/61840/18
Linked PRs
The text was updated successfully, but these errors were encountered: