Rhodri, > MyVar is a global here, so nonlocal explicitly doesn't pick it up.
I do not agree with you there (the variable being global). If it where than I would have been able to alter the variable inside the procedure without having to resort to a "global" override (an override which is only valid for the context its used in by the way, not anywhere else) Than again, that is how it works in a few other languages, so I might have been poisonned by them. :-) Regards, Rudy Wieser -- https://mail.python.org/mailman/listinfo/python-list