Replies: 1 comment 1 reply
-
Yes, this can be improved. I agree, that error is confusing. If I mistype a color name, I shouldn't get that exception. There is I don't think either of these things are difficult changes to make. |
Beta Was this translation helpful? Give feedback.
-
I got used to teaching "Processing-like" colors, with the
fill(r, g, b)
style color control, in my classes because, well, I've been doing like this for many years... old dog, new tricks, etc.But hey, I'm thinking about embracing the great matplotlib & "CSS4" style string names now! So, today, playing a bit with the strings I decided to try a wrong name to see what happened, and I was a bit surprised by the signature & error shown.
Do you think this could be improved? I'm not really sure what I expected, but I think I didn't expect
str
to be flagged as an invalid argument type. Maybe this could be a ValueError ?Beta Was this translation helpful? Give feedback.
All reactions