Attribute reference design
henrik at chamalulu.com
Wed Jul 2 11:40:57 CEST 2008
On Jul 2, 10:13 am, Bruno Desthuilliers <bruno.
42.desthuilli... at websiteburo.invalid> wrote:
> Nope. The wrapping happens at lookup time, thru the descriptor protocol
> (the same thing that gives support for properties).
Aha, I should read up on that.
> Help on built-in function dir in module __builtin__:
So, the dir function is a little more helpful than I thaught. I
checked instance.__dict__ now instead of dir(instance). No methods.
It's getting clearer. Thank you.
I think you've provided me with a good reason for class instances to
delegate attribute references to the class if class instance doesn't
contain the attribute. Diez, Gary, Bruno; Thanks for your help.
More information about the Python-list