[Python-Dev] Class Methods

Thomas Heller thomas.heller at ion-tof.com
Mon Apr 23 11:15:11 EDT 2001


"Just van Rossum" <just at letterror.com> wrote in message news:3AE4455B.EB2FEAC at letterror.com...
> Thomas Heller wrote:
> >
> > "Just van Rossum" <just at letterror.com> wrote ...
> > > I once proposed (and implemented as an extension to the metaclass hook)
> > > this:
> > >
> > > class Foo:
> > >     __class__ = WeirdClass
> > >
> > > I still don't think that's all that bad, especially since it screams
> > > magic at you...
> >
> > Is your code available somewhere?
>
> No, but I just found the patch in my archives. It's probably against 1.5.2,
> so might not even apply to 2.x. I've pasted it below.
>
> Just

Thanks for the patch. Will try it out - very nice idea indeed.

Looks somewhat similar to what Don Beaudry does in his objectmodule,
he uses the same syntax.

Thomas





More information about the Python-list mailing list