Intercepting binding?

Rhodri James rhodri at wildebst.demon.co.uk
Wed Sep 23 20:49:52 EDT 2009


On Thu, 24 Sep 2009 01:34:35 +0100, andrew cooke <andrew at acooke.org> wrote:

>
> For example, I assume it's possible to somehow access the dictionary
> for the current block, but I can't see how to do this after
> assignment.  If I do it in the Foo constructor, for example, "a" will
> not yet be bound.

I apologise for failing to notice earlier that you know what you're
talking about.  I blame the hour :-)

I'm not sure you can access the namespace dictionary of the "current
block" (module?), that's the problem.  Oh, except via locals(), which
might do exactly what you're after depending.  Excuse me, I'm being
very dim tonight.

-- 
Rhodri James *-* Wildebeest Herder to the Masses



More information about the Python-list mailing list