Syntax modification idea: (classmethods, properties locking...)
Ian Bicking
ianb at colorstudy.com
Fri Jan 24 15:59:30 EST 2003
On Fri, 2003-01-24 at 08:19, Michele Simionato wrote:
> 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),{})
Okay, now what does that *mean*? :) (It doesn't seem to be in the
documentation)
--
Ian Bicking Colorstudy Web Development
ianb at colorstudy.com http://www.colorstudy.com
PGP: gpg --keyserver pgp.mit.edu --recv-keys 0x9B9E28B7
4869 N Talman Ave, Chicago, IL 60625 / (773) 275-7241
More information about the Python-list
mailing list