Test None for an object that does not implement ==

Chris Angelico rosuav at gmail.com
Sun Dec 25 09:23:29 EST 2011


On Mon, Dec 26, 2011 at 1:13 AM, Roy Smith <roy at panix.com> wrote:
> If you were designing the interface from scratch, you would probably
> represent that with an exception hierarchy

Or possibly with "returns a False value", giving the option of None
for none available, False for none will ever be available. Of course,
you then have to guarantee that your live return values will always
boolify as True.

ChrisA



More information about the Python-list mailing list