No meta-type in Python?

Remco Gerlich scarblac at pino.selwerd.nl
Sat Jan 13 19:21:57 EST 2001


Chris Ryland <cpr at emsoftware.com> wrote in comp.lang.python:
> Just out of curiousity, why is there no <type 'type'> in Python?

There is one. Types are of type type.

>>> x=1
>>> type(x)
<type 'int'>
>>> type(type(x))
<type 'type'>

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

?

Ellipsis isn't a type. Ellipsis is, well, Ellipsis :)

-- 
Remco Gerlich



More information about the Python-list mailing list