[Types-sig] Re: Meta-classes discussion starter

Just van Rossum just@letterror.com
Tue, 1 Dec 1998 20:51:05 +0100

At 10:18 AM -0500 12/1/98, Guido van Rossum wrote:
>Question for the types-sig readers: is it warranted to add this to the
>next release?  I *could* smuggle it into 1.5.2 but I'm noty convinced.
>It might even break existing code (Don B's tricks, or Jim F's
>extension classes hooks).  Opinions?

Maybe it breaks Donald's stuff, since he also uses __class__ to mean
things. If it does break, I'd be happy to call it something else (maybe

>Personally, I think I won't be
>using or documenting this and I won't guarantee that it's still there
>in 1.6 -- since in 2.0 things will probably be different (or the same,
>but that's hard to say -- the metaclasses stuff is 100% sure to change
>in 2.0 anyway and I won't promise b/w compatibility there).

It's a hack/hook for now, which should be replaced with real syntax in 2.0
unless _all_ proposals are uglier than using __class__ ;-). B/w
compatibility is not an issue. My main reason for having it now is to be
able to "easily" experiment with metaclasses, maybe it's even possible to
prototype an object model for Python 2.0 using Python 1.x. Right now I'm
trying to implement the current class protocol _using_metaclasses_, and
once that works I'd like to imitate the current instance protocol, again
using metaclasses. My head is still exploding at regular intervals, but it
is a great deal more complicated than Meta.py, which really only implements
the instance protocol,  using regular classes... Now, if I get *that* to
actually work, I'll write something up and write some demo's.