On Sun, Oct 10, 2021 at 10:28 AM Brandt Bucher <brandtbucher@gmail.com> wrote:
the peephole optimizer shouldn’t be tasked with “fixing” poorly-written or uncommon code… just improving common code.

As soon as this pattern appears in a benchmark suite we'll optimize it away. :-) (That is, *if* the optimizer can prove that it can't raise a name error.)
 
--
--Guido van Rossum (python.org/~guido)