On 31/01/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Fortunately, the scopes in question are always named.
> Can't we just reference what's already there?
>
> >>> x = 10
> >>> def a():
> ... x = 3
> ... def b():
> ... a.x = 4
> ... print a.x
> ...
> ... b()
> ..
[EMAIL PROTECTED] wrote:
> Tangent (Utter Tomfoolery)
>
> More interestingly, one sees (if one squints) the distinction
> between modules,
> classes, and functions blur:
>
> >>> def new_b():
> ... print "tee hee"
> >>> a.b = new_b()
> >>>a()
> tee hee
> 3
> >>> print x
> 5
>
After