Closed Dreamsorcerer closed 4 years ago
Sorry, do not think this is good idea. We can ask a lot of questions, like why "null"? What input do you expect? And how will you check for None
only then?
We can introduce something like StrNull
that will check for some common string nulls, like null
, None
etc.
I'll rethink it, and maybe come back with ToNull/StrNull or similar.
Although, in answer to checking for None
only, just use Atom(None)
or something direct, there's really no need for a dedicated None
only object.
Is it reasonable to allow "null" for the Null object?
Reasoning is that sometimes we're trying to operate on values passed from JS, if they've not gone through json.loads(), then we get the string value "null", rather than None. I think allowing this case, is less likely to introduce bugs in code between JS and Python.