On Dec 30 2007, 11:01 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 30 Dec 2007 20:00:14 -0800, bukzor wrote: > > I think you struck at the heart of the matter earlier when you noted > > that this is the simplest way to declare a static variable in python. > > Using the 'global' keyword is the other way, and is much more explicit, > > and much more widely used. I also see this as the main use of the > > 'notlocal' keyword to be introduced in py3k (it also fixes the example > > given by Istvan above). > > There doesn't appear to be any reference to a "notlocal" keyword in > Python 3 that I can find. Have I missed something? It sounds like an > April Fool's gag to me. Do you have a reference to a PEP or other > official announcement? > > -- > Steven
I got it slightly wrong. It's 'nonlocal': http://www.python.org/dev/peps/pep-3104/ --Buck -- http://mail.python.org/mailman/listinfo/python-list