Ben Finney <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: > > > [EMAIL PROTECTED] (Aahz) writes: > > > if schema.elements.has_key(key) is False: > > > > I think I was reading the same code recently (epydoc?) and was also > > momentarily horrified ;-) until I realized that it was quite > > deliberately using three-valued logic (True, False, None) for some > > presumably-sensible reason. > > Apparently a reason unrelated to dict.has_key, which is documented as > returning only True or False, never None.
Yes, that's true, I didn't really take in this particular example, just the use of "is <bool constant>". That's not the way it was used in docutils, though (do I mean docutils?). John -- http://mail.python.org/mailman/listinfo/python-list