
On 1 March 2018 at 06:40, Chris Angelico <rosuav@gmail.com> wrote:
On Thu, Mar 1, 2018 at 3:31 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
Since ".NAME" is illegal for both variable and attribute names, this makes the fact statement locals are a distinct namespace visible to readers as well as to the compiler, and also reduces the syntactic ambiguity in with statements and exception handlers.
I've mentioned this in the alternate syntaxes, but I don't like having to state a variable's scope in its name. Python doesn't force us to adorn all global names with a character, and the difference between function-local and statement-local is generally less important than the difference between global and function-local. But it IS a viable syntax, and I'm saying so in the PEP.
Agreed. This feels far to much like Perl's "sigils" that attach to a name ($var is a scalar, @var is a list, etc). Strong -1 from me. Although I *do* agree that such decoration gets rid of a lot of the worst ambiguities in the proposal. But if we're being asked to choose the lesser of 2 evils, my response is "neither" :-) Paul