ClassName.attribute vs self.__class__.attribute

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Fri Jun 13 09:00:35 CEST 2008


Duncan Booth a écrit :
> Bruno Desthuilliers <bruno.42.desthuilliers at websiteburo.invalid> wrote:
> 
>> FWIW, metaclasses do have a class attribute that refers to itself !-)
>>
> One metaclass (i.e. type) has a class attribute that refers to itself.
 >
> Other metaclasses have a class attribute that refers to the metaclass's 
> metaclass. I can't think of any situation where a metaclass would be its 
> own metaclass except for 'type' itself, but then I think I've got a 
> headache trying to think about this

Yeps, same pattern here :-/

Thanks for the correction, anyway.
(snip)



More information about the Python-list mailing list