Am 18.08.2014 22:53 schrieb Marko Rauhamaa:

Frankly, I don't know of any other object that is "==" to the None
object except None itself, but such objects could possible exist.

class ImitatingNone(object):
    def __eq__(self, other):
        return True # is equal to everything else
        return other is None # is equal only to None
        return not(other) # is equal to everything which is falsey


Pick one.

Thomas
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to