[Python-Dev] bool does not want to be subclassed?

"Martin v. Löwis" martin at v.loewis.de
Sat Feb 14 11:22:34 EST 2004


Gerrit wrote:
> Isn't this just modifying A.__dict__, where __getattribute__ looks into
> to see whether something is defined? Or is that the same thing?

Correct. However, to the user, this should be an implementation detail,
and is nearly indistinguishable from

 >>> A.__name__="B"
 >>> A
<class '__main__.B'>

Regards,
Martin




More information about the Python-Dev mailing list