donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
291 stars 57 forks source link

Bad colours #348

Closed donkirkby closed 2 years ago

donkirkby commented 2 years ago

What I did

Used an unknown colour name in turtle graphics.

import turtle as t

t.pensize(5)
t.color('red')
t.forward(50)
t.right(90)
t.color('brightyellow')
t.forward(100)

What happened

It ignored the "brightyellow" colour, and continued drawing. The vertical line was black in PyCharm, and red in the browser.

What I wanted to happen

Raise an error, like when I run the code in regular Python:

turtle.TurtleGraphicsError: bad color string: brightyellow

My environment

Describe the versions of everything you were using: