continue in try block
rocky opened this issue · 0 comments
rocky commented
Decompilng compiled bytecode for:
for a in [__name__]:
try:len(a)
except:continue
gives:
ParserError: --- This code section failed: ---
0 SETUP_LOOP '47'
3 LOAD_NAME '__name__'
6 BUILD_LIST_1 None
9 GET_ITER None
10 FOR_ITER '46'
13 STORE_NAME 'a'
16 SETUP_EXCEPT '33'
19 LOAD_NAME 'len'
22 LOAD_NAME 'a'
25 CALL_FUNCTION_1 None
28 POP_TOP None
29 POP_BLOCK None
30 JUMP_BACK '10'
33_0 COME_FROM '16'
33 POP_TOP None
34 POP_TOP None
35 POP_TOP None
36 JUMP_BACK '10'
39 JUMP_BACK '10'
42 END_FINALLY None
43_0 COME_FROM '42'
43 JUMP_BACK '10'
46 POP_BLOCK None
47_0 COME_FROM '0'
Syntax error at or near `JUMP_BACK' token at offset 39
You might use uncompyle6's grammar for 2.7 for a suggestion as to how to handle.