please help explain this result

Yingjie Lan lanyjie at
Sun Oct 17 14:00:59 CEST 2010

> From: Nobody <nobody at>

> The determination of local or global is made when the "def"
> statement is
> executed, not when the function is called.

Thanks a lot for your reply, which is of great help!

So, I assume that when the 'def' is executed, any 
name occurred will be categorized as either local 
or global (maybe nonlocal?).



More information about the Python-list mailing list