News for hackers. Stuff that matters.
Re:Notset: A Do-Not-Care value for Python by timClicks on Saturday November 10, 2012 @03:41PM (#4767674)
Sorry for the bikeshedding, but double negatives are a real pain. Not so much for the code itself, but for talking to colleagues and giving talks. Off the top of my head, Empty would could work.
Re:Notset: A Do-Not-Care value for Python by shmeedogg on Saturday November 10, 2012 @04:00PM (#4767718)
Agreed. 'Empty' works, as does 'Blank' or 'Unassigned'.'Nil' is concise, but might be a little too easily confused with 'None' (especially so for someone coming from Ruby).

I'd love an approach that used the standard library, but there doesn't seem to be a type-agnostic approach. float('nan') won't make sense for other types, and using `types.NoneType` instead of `None` seems even less understandable.

Re:Notset: A Do-Not-Care value for Python by aroberge on Saturday November 10, 2012 @03:56PM (#4767705)
Personally I would use "assigned" 1) to better reflect the meaning and 2) to follow PEP-8 and not use an uppercase.
Re:Notset: A Do-Not-Care value for Python by shmeedogg on Saturday November 10, 2012 @04:03PM (#4767731)
Uppercase was chosen to match Python's existing singletons, `True`, `False`, and `None`. Lowercase might look a little too much like a variable, and all-upper might look too much like a module-level const, IMHO.
Re:Notset: A Do-Not-Care value for Python by mst on Saturday November 10, 2012 @04:16PM (#4767766)
I think I'd've gone for Unset. Empty's a bit close to None.
Re:Notset: A Do-Not-Care value for Python by aiiane on Saturday November 10, 2012 @04:28PM (#4767796)
How about 'Omitted'?

foo=Omitted

if foo is not Omitted:

Re:Notset: A Do-Not-Care value for Python by shmeedogg on Saturday November 10, 2012 @08:15PM (#4768391)
To my ear, this does sound the best. Thanks for the suggestion!