No meta-type in Python?

David C. Ullrich ullrich at math.okstate.edu
Sat Jan 13 13:53:05 EST 2001


In article <93q4og$ppg$1 at nnrp1.deja.com>,
  Chris Ryland <cpr at emsoftware.com> wrote:
> Just out of curiousity, why is there no <type 'type'> in Python?

Other than the <type 'type'> type you mean? (type(type(42))
is <type 'type'>, for example.) It even has a name in types;
<type 'type'> is the type TypeType.

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

Ellipsis is an object, not a type. Or so it appears to me
from the docs. type(type(Ellipsis)) _is_ <type 'type'>.

> I realize this is opening a can of worms about meta-types (cf.
> Smalltalk's (and other languages) theoretical completeness in this
> area), but simply looking for enlightenment from the experts.

Not being an expert on any of this I imagine I haven't answered
the question you _meant_ to ask...

> Chris Ryland * Em Software, Inc. * www.emsoftware.com
>
> Sent via Deja.com
> http://www.deja.com/
>

--
Oh, dejanews lets you add a sig - that's useful...


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list