gh-133244: TPen.pensize raises TurtleGraphicsError if called with a negative number - #135268
gh-133244: TPen.pensize raises TurtleGraphicsError if called with a negative number#135268adorilson wants to merge 10 commits into
Conversation
…#106335) Remove private _PyThreadState and _PyInterpreterState C API functions: move them to the internal C API (pycore_pystate.h and pycore_interp.h). Don't export most of these functions anymore, but still export functions used by tests. Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C API, but keep it in the stable API.
This reverts commit ebfa093.
…h a negative number
ZeroIntensity
left a comment
There was a problem hiding this comment.
This is user-facing, so please add a news entry. The easiest way will be with blurb-it, unless you already have blurb installed locally.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
This PR is stale because it has been open for 30 days with no activity. |
| @@ -0,0 +1 @@ | |||
| :meth:`!turtle.TPen.pensize` raises an exception if called with a negative *width* argument. | |||
There was a problem hiding this comment.
What about pen(pensize=-1)?
There was a problem hiding this comment.
Good catch.
I'll address it.
Co-authored-by: Stan Ulbrych <stan@python.org>
@StanFromIreland any thought about it? |
Documentation build overview
498 files changed ·
|
Fix #133244.
Before
Now
For now, the
0behaviour wasn't changed, but I think it would.If we call
turtle.pensize(0)it changes the width to0, but when the turtle draws, the real line's width is1. It seems to be a misconception. However, change could be a backwards compatibility concern. Perhaps we can schedule a change for now with aDeprecationWarning.