Actually I am quite satisfied with and error, which is my expectation.
But the implicit global variable access seems quite uncomfortable to
me. Why is that necessary?

On Nov 3, 3:39 am, Stargaming <[EMAIL PROTECTED]> wrote:
> On Sat, 03 Nov 2007 07:18:17 +0000, Sullivan WxPyQtKinter wrote:
> > I am confused by the following program:
>
> > def f():
> >     print x
> > x=12345
> > f()
>
> > result is:
>
> > 12345
>
> If python can't discover x in your current scope and you do not bind to
> it there, it will automatically access that global name x.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to