Calvin Spealman wrote:

> I will have to disagree with you there. If hasattr(a,b) returns True,
> one should be able to expect a.b will work properly. Otherwise, the
> majority of use cases for hasattr will be completely thrown out the
> window. How can hasattr work properly with properties if it doesn't
> call the property access code?

In the vast majority of code that I write, if a class has
a descriptor for a given property, but the accessor code
doesn't work, then there is a bug.

In a case where that wasn't true, a hasattr slot in the
descriptor would enable me to code it so it did the right
thing.

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

Reply via email to