On 11/1/06, Ka-Ping Yee <[EMAIL PROTECTED]> wrote:
> I think a fairer survey example would be something like this:
>
>     n = 1
>     def f():
>         n = 2
>         def g():
>             global n = 99
>             return n
>         g()
>
>     f()
>     print n
>
> Which 'n' do you expect g() to change?

The only reason I didn't use that in the first place is that is seems
extremely unlikely in real code.  Who uses the same name for a
module-level binding and a function-local binding?

So yes, that's the corner case, but I contend that the corner case
will almost never come up.

Steve
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to