Aahz <[EMAIL PROTECTED]> wrote: ... > >>>the canonical idiom when you need such distinction is: > >>> > >>>_not_there = object() ... > >> What's your preferred idiom when you're dealing with storable objects? > > > >What's a "storable object"? You mean, something that can be pickled, or > >passed to the .write method of a file object, or stored in a database, > >or what else? > > Pickled and/or stored in a DB.
Relational databases have the concept of NULL specifically to indicate "there is NOTHING here". I love it. For pickling, object() as a unique "nothing here, NOT EVEN a None" marker (AKA sentinel) works fine. Alex -- http://mail.python.org/mailman/listinfo/python-list