staticmethod and setattr

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Mon Mar 15 09:51:30 EDT 2010


Michael.Lausch a écrit :
(snip)


> Now I'm trying to understand why this is the case.
> How is Foo.__dict__['_ref']  different from Foo._ref?
> Shouldn't it return the same attribute?
> 

It's an application of the descriptor protocol:

http://wiki.python.org/moin/FromFunctionToMethod



More information about the Python-list mailing list