Metaclass with name overloading.

Jacek Generowicz jacek.generowicz at cern.ch
Wed Sep 29 03:13:33 EDT 2004


aleaxit at yahoo.com (Alex Martelli) writes:

> Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
>    ...
> > > No, you can't, and it's not just a parser issue. Python uses
> > > direct C calls to the native dict type. It's hard coded,
> > 
> > I feared this would be the case.
> 
> It's not (not in 2.4 at least)

For what definition of "hard coded" ?

> -- the STORE_NAME is quite ready to find a non-dict as the frame's
> f_locals.  The problem is getting your object to be used as the
> frame's f_locals in the first place -- hard but that only affects a
> few spots in ceval.c.

So, from the perspective of trying to code it in pure Python, it _is_
hard coded, IIUC. 

(Unfortunately, I cannot afford the luxury of playing with the Python
implementation itself; I must deliver code which works with a
bog-standard Python 2.3.4. I'd love to have the time to play with
ceval.c on my own account ... but that is another luxury I cannot
afford :-( )



More information about the Python-list mailing list