Jan,

> The nonlocal statement causes the listed identifiers to refer to 
> previously bound variables in the nearest ******enclosing scope excluding 
> globals******.

I read that too, but didn't get from it that the main scope is excluded (I 
assumed the"excluding globals" was ment at as such declared variables) . 
Thanks the clarification.

Too bad though, it means that procedures that want to share/use its callers 
variables using nonlocal can never be called from main.  And that a caller 
of a procedure using nonlocal cannot have the variable declared as global 
(just tested it).

Regards,
Rudy Wieser


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

Reply via email to