Intercepting binding?

andrew cooke andrew at acooke.org
Thu Sep 24 02:34:35 CEST 2009


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.

On Sep 23, 8:15 pm, andrew cooke <and... at acooke.org> wrote:
> This is a bit vague, I'm afraid, but is there any way for me to take
> code like:
>
>    a = Foo()
>    beta = Bar()
>
> and somehow attach the string "a" to the Foo instance and "beta" to
> the Bar instance.  At some later point in the program I want to be
[..]



More information about the Python-list mailing list