What a great PEP. Really clear to read, considers all the angles, makes a compelling case for an optimization and includes a link to a full implementation that passes all of the tests: https://github.com/python/cpython/pull/101441
It will always astound me that Python caused at least a decade of frustration due to its absolutely unnecessary source compatibility break, but then couldn’t even be bothered fixing a slew of the actual language issues like, or even just the bare minimum of not directly exposing VM implementation details all over again. And yet this PEP has to list that locals() includes temporaries.
What a great PEP. Really clear to read, considers all the angles, makes a compelling case for an optimization and includes a link to a full implementation that passes all of the tests: https://github.com/python/cpython/pull/101441
I’m so old, I remember when they added the hack to Python 3000 to namespace comprehension variables as a pseudofunction…
It will always astound me that Python caused at least a decade of frustration due to its absolutely unnecessary source compatibility break, but then couldn’t even be bothered fixing a slew of the actual language issues like, or even just the bare minimum of not directly exposing VM implementation details all over again. And yet this PEP has to list that locals() includes temporaries.
Truly mind blowing.
A testament to how not to build a language tbh, things have gotten way better post-Guido