On Wed, Nov 18, 2020 at 4:08 AM Richard Damon <rich...@damon-family.org> wrote: > > One comment about having the exception handler 'save state' and restore > it is that frequently the purpose of the exception handler is TO make > changes to outer variable to fix things up based on the exception. > > I could see the desire of a way to create an internal scope of sorts and > create names limited to that scope, but wouldn't want such a scope being > anywhere automatic, and likely what would make more sense is defining a > particular name (or names) to have a limited scope.
The ONLY variable that would be special is the one named in the "except Exc as e:" clause. Everything else would follow the normal rules. This is the only variable that is currently special, and ti'd be the only one that ever needs to be special (since it has the refloop that makes memory management harder). ChrisA _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/6O2YYUF7M5PZNZQX7EVYU4U7KTJ7QUHB/ Code of Conduct: http://python.org/psf/codeofconduct/