declarations summary

Michael Tobis mt at 3planes.com
Mon Feb 7 11:02:29 EST 2005


Alex Martelli wrote:
> Michael Tobis <mt at 3planes.com> wrote:
>    ...
> > .x = 1
> > .def foo():
> > .   if False:
> > .      global x
> > .   x = 2
> > .foo()
> > .print x
> >
> > prints "1"
>
> Wrong:

> >>> foo()
> >>> print x
> 2
>
> And indeed, that IS the problem.

Right. That's what I meant.

Sorry, that was a thinkographical error. 

mt




More information about the Python-list mailing list