No meta-type in Python?

Matthew Dixon Cowles matt at mondoinfo.com
Sat Jan 13 13:44:32 EST 2001


On Sat, 13 Jan 2001 17:54:26 GMT, Chris Ryland <cpr at emsoftware.com>
wrote:

>Just out of curiousity, why is there no <type 'type'> in Python?

But there is.

>I.e., I'd expect type(Ellipsis) to be <type 'type'> rather than <type
>'ellipsis'>.

Since Ellipsis is a built-in object, its type is <type 'ellipsis'>
just as type(1) is <type 'int'>. But the type of both of those types
is what you expect:

>>> type(type(Ellipsis))
<type 'type'>

Regards,
Matt



More information about the Python-list mailing list