Intercepting binding?

andrew cooke andrew at acooke.org
Thu Sep 24 07:49:00 EDT 2009


On Sep 24, 7:12 am, Carl Banks <pavlovevide... at gmail.com> wrote:
>     with capture_changed_bindings() as changed:
>         b = 5
>         c = 4
>         d = 6
>     print changed
>
> test()
>
> Quick and dirty, not robust at all.  But you get the idea.
>
> Carl Banks

brilliant.  using the with context is an excellent idea.  thanks very
much.

andrew



More information about the Python-list mailing list