how to python search for member
When you use dotted access to look up a member (eg, x.y), Python first looks for the member in the instance dictionary. If it's not found, it looks for it in the class dictionary. If it finds it in the class dictionary, and the object implemented the descriptor protocol, instead of just returning it, Python executes it.
No comments:
Post a Comment