Syntax modification idea: (classmethods, properties locking...)

Michele Simionato mis6 at pitt.edu
Fri Jan 24 09:19:59 EST 2003


Ian Bicking <ianb at colorstudy.com> wrote in message news:<mailman.1043356128.29302.python-list at python.org>...
<snip>
> That's reasonable, but still leaves the problem of composing these
> metaclasses.  I've begun using metaclasses in my library code, and I
> like it -- but (I think) I'd need to make my metaclass a subclass of
> this canonical metaclass in order for them to be compatible.  Unless
> maybe you could do __metaclass__ = (PropMetaclass, SomeOtherMetaclass)
> -- I haven't tested that (and metaclasses seem poorly documented right
> now).  I still don't feel entirely comfortable with my understanding of
> the semantics of metaclasses, so I couldn't quite predict what multiple
> metaclasses would mean.

You want

__metaclass__=type('DoubleMetaclass',(PropMetaclass, SomeOtherMetaclass),{})


      Michele




More information about the Python-list mailing list