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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4