On Wed, 30 Nov 2022 at 18:02, Anony Mous <fyng...@gmail.com> wrote: > For instance, a "local:" declaration could be treated as if it were "def > function()" with an immediately succeeding call as far as the interpreter > is concerned. That buys the scoping for (nearly) free. >
That would make "return" in the local scope exit the scope, not the enclosing function. Which is almost certainly not what people would expect from a "local scope" statement. Paul
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/DTPRYE5LROQV6VHBRQFSVRM7SHZ6PGOI/ Code of Conduct: http://python.org/psf/codeofconduct/