Comment on A function decorator that rewrites the bytecode to enable goto in PythonparentComments−klyrs4yThis is true, but I suspect that you're getting downvoted because python doesn't do bytecode optimization.−nerdponx4yCPython doesn't. But the other Python implementations (PyPy, GraalVM, et al) don't even use the CPython bytecode.−klyrs4yAlso true... but this decorator isn't going to work in that context.−masklinn4yCpython absolutely does, just not much of it (it has a peephole optimiser with a very small set of opts).
Comments
This is true, but I suspect that you're getting downvoted because python doesn't do bytecode optimization.
CPython doesn't. But the other Python implementations (PyPy, GraalVM, et al) don't even use the CPython bytecode.
Also true... but this decorator isn't going to work in that context.
Cpython absolutely does, just not much of it (it has a peephole optimiser with a very small set of opts).