Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try : while1 if break finally #49

Closed
rocky opened this issue Oct 11, 2017 · 1 comment
Closed

try : while1 if break finally #49

rocky opened this issue Oct 11, 2017 · 1 comment

Comments

@rocky
Copy link

rocky commented Oct 11, 2017

Running on:

# Tests
# while1stmt ::= SETUP_LOOP l_stmts JUMP_BACK POP_BLOCK COME_FROM
# tryfinallystmt ::= SETUP_FINALLY suite_stmts_opt POP_BLOCK

try:
    while 1:
        if __file__:
            break
finally:
    pass

produces:

$ uncompyle2 10_if_break_finally.pyc 
# 2017.10.11 09:47:12 EDT
#Embedded file name: simple_source/stmts/10_if_break_finally.py
--- This code section failed: ---

0	SETUP_FINALLY     '24'

3	SETUP_LOOP        '20'

6	LOAD_NAME         '__file__'
9	POP_JUMP_IF_FALSE '6'

12	BREAK_LOOP        None
13	JUMP_BACK         '6'
16	JUMP_BACK         '6'
19	POP_BLOCK         None
20_0	COME_FROM         '3'
20	POP_BLOCK         None
21	LOAD_CONST        None
24_0	COME_FROM         '0'

24	END_FINALLY       None

Syntax error at or near `POP_BLOCK' token at offset 19
@wibiti
Copy link
Owner

wibiti commented Jul 16, 2018

Can't reproduce. Maybe fixed already.

@wibiti wibiti closed this as completed Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants