On Sat, Mar 17, 2018 at 5:49 PM, David Foster <[email protected]> wrote: > (3a) With a header-limited scope (in proposal #1 above), I advocate that a > named expression should NOT be able to shadow other variables, giving a > SyntaxError. I can't think of a reasonable reason why such shadowing should > be allowed, and preventing shadowing may eliminate unintentional errors.
Header-limited scope is hard to define. Do you mean expression-local? (Also hard to define.) Do you mean local to one line of source code? Definitely not. And what happens with a 'for' loop - part of its header gets run after each loop iteration but still kinda references stuff that was done once-only before the loop started. ChrisA _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
