The Don Beaudry/Jim Fulton hack
abrahams at mediaone.net
abrahams at mediaone.net
Thu Dec 30 11:37:17 EST 1999
In article <slrn86mqvl.8r1.neelk at brick.cswv.com>,
neelk at alum.mit.edu wrote:
> Dave Abrahams <abrahams at mediaone.net> wrote:
> >
> > But as you can see, you can't set the __class__ attribute of an
instance to
> > anything other than a class. So what have I missed? How am I
supposed to get
> > this to work "without writing C code"?
>
> Read GvR's essay, "Metaclass Programming in Python 1.5" at
>
> http://www.python.org/doc/essays/metaclasses/
>
> I have to admit that you are more hardcore than me -- I never bothered
> looking at the C source once I had found this essay. :)
Thanks! I forgot that you can also put an attribute calle '__class__'
on an object of type class, not just of type instance. Duh.
Now I'm trying to get MESS to compile and have run into a couple of
seemingly insurmountable obstacles: parts of the Python API used to
implement MESS seem to be missing (?!). They are:
PyAccess_Check
PyAccess_AsValue
PyAccess_SetValue
PyAccess_SetOwner
Does anybody have a clue where these bits can be found (or explained -
I'd happily adjust the MESS code if I had a clue what it was doing)?
TIA,
Dave
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list