On Wed, Mar 5, 2014 at 2:18 AM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > You don't need to have static typing to have declared variables. The two > are independent. E.g. one might have a system like Python, except you > have to declare your variables before using them: > > global x > local a > a = x+1
Aside: If you declare your locals, you shouldn't need to declare your globals. Though I could imagine a rule that global rebinding still needs to be declared, but you certainly shouldn't need to declare nonlocal if you have a local declaration. Absence of local => nonlocal. ChrisA -- https://mail.python.org/mailman/listinfo/python-list