https://github.com/python/cpython/commit/359f841a23ec8e41f7d800d5a836dcba39e12650 commit: 359f841a23ec8e41f7d800d5a836dcba39e12650 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: StanFromIreland <[email protected]> date: 2026-09-19T16:28:27+01:00 summary:
[3.13] gh-136722: Document the `turtle.TurtleGraphicsError` exception (GH-157792) (#157796) (cherry picked from commit e39b7f2136b930ace0916145844e8eedcf3c455f) Co-authored-by: 单禹铎 <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 6accb93fa04db8..d5eb4f001affb2 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -2444,6 +2444,25 @@ Public classes * ``a.rotate(angle)`` rotation +Exceptions +========== + +The :mod:`!turtle` module defines the following exception: + +.. exception:: TurtleGraphicsError + + Raised for invalid arguments or operations. + For example, a malformed color string: + + .. doctest:: + :skipif: _tkinter is None + + >>> turtle.color("blau") + Traceback (most recent call last): + ... + turtle.TurtleGraphicsError: bad color string: blau + + .. _turtle-explanation: Explanation _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
