metaclass that inherits a class of that metaclass?

infidel saint.infidel at gmail.com
Wed Jun 1 13:53:58 EDT 2005


> because i need the representations of the other systems types to
> themselves be python classes, and so i need a metaclass to make sure
> they follow certain rules. This metaclass is for that system what type
> is for python

I think that's exactly the same thing I just said.  More or less.
Although depending on exactly what you mean by "follow certain rules",
you might only need a common base class rather than a metaclass.

> same thing, no?

Uh, no, I don't think so.  type is, from my trivial understanding, the
base type and base metaclass for everything else in python.  Saying
"type is an object" is only confusing you into thinking it is a
subclass of object, which is not the case.  object is a class, which I
believe has type as it's metaclass (though I could be mistaken - this
gets terribly confusing very quickly).




More information about the Python-list mailing list