Message 280762 - Python tracker (original) (raw)
Oops, I forgot to mention one other potential cost-minimisation strategy for a co_cleanuptab
field: only populate it with setup/cleanup opcode pairs that include a yield, yield from, or await operation between them.
The potential benefit I can see to not doing that is that if the information is always available (even on synchronous frames), then greenlet based frameworks like gevent may be able to make use of it.