None versus MISSING sentinel -- request for design feedback
ethan at stoneleaf.us
Fri Jul 15 13:18:28 EDT 2011
> Steven D'Aprano wrote:
>> Well yes, but None is an explicit missing value too. The question I have
>> is if I should support None as that value, or something else. Or if anyone
>> can put a good case for it, both, or neither and so something completely
> If it's any help, I think (some of?) the database interface packages already
> do just that, returning None when they find NULL fields.
Indeed. I'm adding Null support to my dbf package now, and while some
of the return values (Logical, Date, DateTime, and probably Character)
will have their own dedicated singletons (Null, NullDate, NullDateTime,
NullChar -- which will all compare equal to None) the numeric values
will be None... although, now that I've seen this thread, I'll add the
ability to choose what the numeric Null is returned as.
More information about the Python-list