>. If it doesn't, could this one optimization be left in the peephole optimizer at bytecode level?
Sadly no, because at that time there is not enough information left to do things correctly. The problem manifest with constructs like if something or __debug__: ... You cannot just look at the bytecode before the POP_JUMP_IF_FALSE (or similar) because you don't know reliably which bytecodes correspond to the entire condition (at least that I know of). My proposal (it seem that works, but is being reviewed still) is basically doing a compiler pass that just check for errors over the blocks that we don't want to generate bytecode instead of not visiting them at all. I think is the less intrusive and faster solution that I can think off. _______________________________________________ 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/22SLXBQI6RSVUSCKW25YGQFESD5OCEBV/