[Snek] How to return a string from builtin?

Mikhail Gusarov dottedmag at dottedmag.net
Wed Feb 19 11:51:00 PST 2020

Hi Keith,

On 19 Feb 2020, at 20:37, Keith Packard wrote:

> You might consider using numeric values instead of strings and adding
> builtin variables with the desired name?

These are names of colors: "none" / "red" / "black" / ....

I don't have an opinion whether numbers or strings are better here —
what do you think?

Also I suppose I should return None instead of "none" here if sensor
doesn't detect any color.


More information about the Snek mailing list