<br><br><div><span class="gmail_quote">On 11/1/06, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 11/1/06, Neil Toronto <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:<br>> Ka-Ping Yee wrote:<br>> > I have finally completed a draft of a PEP on rebinding of names<br>> > in outer scopes. I've tried to go back and gather all of the
<br>> > (amazingly numerous) proposals -- if i've forgotten or misattributed<br>> > any, let me know and i'll be happy to correct them.<br><br>> It's beautiful. Like Michael said, an impressive amount of history.
<br><br>Agreed.<br><br>> I wondered about this specifically:<br>><br>> > A shorthand form is also permitted, in which nonlocal is prepended to<br>> > an assignment or augmented assignment statement:<br>
> ><br>> > nonlocal x = 3<br>><br>> Is a similar statement for globals legal in Py3k? It's not in 2.4<br>> (according to my own testing) or 2.5 (according to the grammar). The<br>> syntax for 'global' and 'nonlocal' should be almost identical.
<br><br>It's been proposed and I would endorse it.<br><br>My personal preference is still to abuse 'global' instead of adding a<br>new, ugly keyword. That would make the syntax for global and nonlocal<br>completely identical. :-) But I seem to be alone in this preference.
<br>:-(</blockquote><div><br>Seeing Guido have a sad face is enough to force me to have an opinon. I personally always viewed 'global' as "this variable is not local", so making it truly mean that works for me. Otherwise I would like the 'free' keyword (I understand why Ping prefers 'nonlocal', but i just don't like it without a hyphen in it and that isn't about to happen and I have no problem going with the lambda calculus terminology).
<br><br>Then again Guido could still get his way since this could end up being quite the little argument as demonstrated by the list of possible keyword names and thus require a BDFL pronouncement the way Guido wants it. =)