Message416825
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. |
|
Date |
User |
Action |
Args |
2022-04-05 22:35:28 | gvanrossum | set | recipients:
+ gvanrossum, gregory.p.smith, vstinner, Mark.Shannon, dom1310df |
2022-04-05 22:35:28 | gvanrossum | set | messageid: <1649198128.59.0.1701503061.issue47185@roundup.psfhosted.org> |
2022-04-05 22:35:28 | gvanrossum | link | issue47185 messages |
2022-04-05 22:35:28 | gvanrossum | create | |
|