You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Fix 2.6- parsing of "for .. try/else" ...
with "continue" inside
This commit is contained in:
BIN
test/bytecode_2.6/03_tryelse_continue.pyc
Normal file
BIN
test/bytecode_2.6/03_tryelse_continue.pyc
Normal file
Binary file not shown.
14
test/simple_source/bug26/03_tryelse_continue.py
Normal file
14
test/simple_source/bug26/03_tryelse_continue.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# 2.6- Try/else in a loop with a continue which
|
||||||
|
# requires a tryelsestmtc
|
||||||
|
# From 2.6- test_codecs.py
|
||||||
|
def test_specific_values(self):
|
||||||
|
for flags in self:
|
||||||
|
if flags:
|
||||||
|
try:
|
||||||
|
self = 1
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
self = 2
|
||||||
|
|
||||||
|
self = 3
|
@@ -53,18 +53,9 @@ nn [test_zipfile64.py]=1 # Runs ok but takes 204 seconds
|
|||||||
;;
|
;;
|
||||||
2.6)
|
2.6)
|
||||||
SKIP_TESTS=(
|
SKIP_TESTS=(
|
||||||
[test_cmath.py]=1 # Control flow?
|
|
||||||
[test_codecs.py]=1 # need to fix tryelse
|
|
||||||
[test_coercion.py]=1 # Control flow?
|
|
||||||
[test_decorators.py]=1 # Syntax Error - look at
|
|
||||||
[test_frozen.py]=1 # Control flow?
|
|
||||||
[test_ftplib.py]=1 # Control flow?
|
|
||||||
[test_grp.py]=1 # Long test - might work Control flow?
|
[test_grp.py]=1 # Long test - might work Control flow?
|
||||||
[test_imp.py]=1
|
|
||||||
[test_pwd.py]=1 # Long test - might work? Control flow?
|
[test_pwd.py]=1 # Long test - might work? Control flow?
|
||||||
[test_queue.py]=1 # Control flow?
|
|
||||||
[test_re.py]=1 # Probably Control flow?
|
[test_re.py]=1 # Probably Control flow?
|
||||||
[test_strftime.py]=1
|
|
||||||
[test_trace.py]=1 # Line numbers are expected to be different
|
[test_trace.py]=1 # Line numbers are expected to be different
|
||||||
# .pyenv/versions/2.6.9/lib/python2.6/lib2to3/refactor.pyc
|
# .pyenv/versions/2.6.9/lib/python2.6/lib2to3/refactor.pyc
|
||||||
# .pyenv/versions/2.6.9/lib/python2.6/mailbox.pyc
|
# .pyenv/versions/2.6.9/lib/python2.6/mailbox.pyc
|
||||||
|
@@ -42,6 +42,8 @@ class Python26Parser(Python2Parser):
|
|||||||
except_handler else_suite come_froms
|
except_handler else_suite come_froms
|
||||||
tryelsestmtl ::= SETUP_EXCEPT suite_stmts_opt POP_BLOCK
|
tryelsestmtl ::= SETUP_EXCEPT suite_stmts_opt POP_BLOCK
|
||||||
except_handler else_suitel
|
except_handler else_suitel
|
||||||
|
tryelsestmtc ::= SETUP_EXCEPT suite_stmts_opt POP_BLOCK
|
||||||
|
except_handler else_suitec
|
||||||
|
|
||||||
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD COME_FROM POP_TOP
|
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD COME_FROM POP_TOP
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user