Guido van Rossum <gu...@python.org> added the comment:
This idea just cannot work. Take these two functions: def f(): foo() try: bar() except: pass def g(): try: foo() bar() except: pass Using dis to look at their disassembly, the only hint that in f(), the call to foo() is outside the try block and in g() it is inside it is the presence of some NOP opcodes. The actual demarcation of where the try blocks start and end is exclusively determined by the exception table. It just doesn't make sense to try to validate that correct parameters are being passed in when you are modifying co_code and friends. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47185> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com