Re: global and loop control variable

2015-07-23 Thread Lorenzo Sutton
On 23/07/2015 14:31, Steven D'Aprano wrote: On Thu, 23 Jul 2015 09:20 pm, Lorenzo Sutton wrote: On 23/07/2015 12:24, candide wrote: Now, global declaration has another restriction, as PLR explains: [https://docs.python.org/3.4/reference/simple_stmts.html#the-global-statement]

Re: global and loop control variable

2015-07-23 Thread Steven D'Aprano
On Thu, 23 Jul 2015 09:20 pm, Lorenzo Sutton wrote: > On 23/07/2015 12:24, candide wrote: >> Now, global declaration has another restriction, as PLR explains: >> [https://docs.python.org/3.4/reference/simple_stmts.html#the-global-statement] >> ~ >> Names listed

Re: global and loop control variable

2015-07-23 Thread Lorenzo Sutton
On 23/07/2015 12:24, candide wrote: [...] Now, global declaration has another restriction, as PLR explains: [https://docs.python.org/3.4/reference/simple_stmts.html#the-global-statement] ~ Names listed in a global statement must not be defined as formal pa

global and loop control variable

2015-07-23 Thread candide
About global declarations, Python Language Ref (PLR) explains: [https://docs.python.org/3.4/reference/simple_stmts.html#the-global-statement] ~ Names listed in a global statement must not be used in the same code block textually preceding that global statement.