Introspection

Fredrik Lundh effbot at telia.com
Mon Feb 28 08:23:57 EST 2000


Chuck Esterbrook <echuck at mindspring.com> wrote:
> In Objective-C I can say:
>     [someObject class]
>
> Which in Python would be:
>     someObject.class()

someObject.__class__

for more info, see:
http://www.python.org/doc/current/ref/types.html
http://www.python.org/doc/current/lib/specialattrs.html


> How does Python get the __name__ then?

through the getattr hook?

</F>





More information about the Python-list mailing list