On 7/6/06, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
+1 on nonlocal.<br><br>I think that the := operator is also in case (b), but as I don't like<br>it I'm find with not mentioning it. :-)<br><br>Could someone write a PEP for this? Doesn't have to be very long but<br>I'd like it to summarize the main options proposed and discuss them,
<br>like I did for the switch PEP. It's a p3yk PEP. (We really need to<br>move this to the py3k list...)<br></blockquote></div><br>Drat, too bad this wasn't back in February when I was all for writing the PEP--sadly, I don't have time to do this, maybe later if no one steps up to the plate...
<br><br>For reference, here is a link to the other, rather large, thread on this back then:<br><a href="http://thread.gmane.org/gmane.comp.python.devel/76532/focus=76532">http://thread.gmane.org/gmane.comp.python.devel/76532/focus=76532
</a><br><br>My option one, is essentially "nonlocal", though I spelled it as "use". Really, I am personally agreeable to almost any spelling of such a keyword. I am +1 on "nonlocal", though I know the biggest dissent against it is adding another "global"-like keyword that is not "pythonic".
<br><br>Also in regard to the "prefix-dot" notation (i.e. ".x"), I am -1 for the reason that it introduces a subtle alternate way of spelling local variables. The rules for the usage would have to be strict enough to prevent subtle code obscurity (like what is the semantics for using ".x" and "x" in a scope--are both spellings allowed, and if so, what is the meaning if assignment is involved or is not involved). Of course, if the semantics were well defined such that it would be difficult for users to trap themselves with different spellings of local variables, then I would be +0 for it.
<br><br>Best Regards,<br>Almann<br clear="all"><br>-- <br>Almann T. Goo<br><a href="mailto:email@example.com">firstname.lastname@example.org</a>