On 1 March 2018 at 06:40, Chris Angelico <ros...@gmail.com> wrote:
> On Thu, Mar 1, 2018 at 3:31 PM, Nick Coghlan <ncogh...@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
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to