Antoine Pitrou writes:
 > On Sat, 22 Feb 2014 22:13:58 +1100
 > Chris Angelico <ros...@gmail.com> wrote:

 > > hasattr(x,"y") <-> (x.y or True except AttributeError: False)

 > But it's not the same. hasattr() returns a boolean, not an arbitrary
 > value.

I think he meant 

    hasattr(x,"y") <-> (x.y and True except AttributeError: False)

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to