Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

continue in try block #26

Open
rocky opened this issue Nov 26, 2017 · 0 comments
Open

continue in try block #26

rocky opened this issue Nov 26, 2017 · 0 comments

Comments

@rocky
Copy link

rocky commented Nov 26, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant