type vs. module (part2)
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Mon Oct 17 02:35:19 EDT 2011
On Mon, 17 Oct 2011 06:32:00 +0000, Steven D'Aprano wrote:
> So, bringing this back to your examples...
>
> Both t and t1 are classes, both know their internal name as "F", but
> they are different classes, as seen by the fact that their IDs are
> different.
Oops, no, sorry, a mistake... assuming you are correct that both t and t1
are classes, we don't have enough information to know what they believe
they are called. (Printing t and t1 should tell you.) What we know is
that their *metaclass* (the class of a class) knows itself as "F".
--
Steven
More information about the Python-list
mailing list