From 1a137780ad3776b67d6a2ac3252f9ee6a09220bb Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 28 Nov 2017 10:10:45 -0500 Subject: [PATCH] Python 2.4- doesn't do "with" --- uncompyle6/parsers/parse24.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uncompyle6/parsers/parse24.py b/uncompyle6/parsers/parse24.py index 4d9e836a..3cbbb988 100644 --- a/uncompyle6/parsers/parse24.py +++ b/uncompyle6/parsers/parse24.py @@ -60,6 +60,12 @@ class Python24Parser(Python25Parser): while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK COME_FROM while1stmt ::= SETUP_LOOP return_stmts COME_FROM whilestmt ::= SETUP_LOOP testexpr return_stmts POP_BLOCK COME_FROM + with_cleanup ::= LOAD_FAST DELETE_FAST WITH_CLEANUP END_FINALLY + with_cleanup ::= LOAD_NAME DELETE_NAME WITH_CLEANUP END_FINALLY + withasstmt ::= expr setupwithas designator suite_stmts_opt POP_BLOCK LOAD_CONST COME_FROM with_cleanup + withstmt ::= expr setupwith SETUP_FINALLY suite_stmts_opt POP_BLOCK LOAD_CONST COME_FROM with_cleanup + stmt ::= withstmt + stmt ::= withasstmt """) super(Python24Parser, self).add_custom_rules(tokens, customize) if self.version == 2.4: