You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Revise Python version comparisions
And set scanner.show_asm for 3.6
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2016-2017, 2019 Rocky Bernstein
|
# Copyright (c) 2016-2017, 2019, 2021 Rocky Bernstein
|
||||||
"""
|
"""
|
||||||
spark grammar differences over Python 3.4 for Python 3.5.
|
spark grammar differences over Python 3.4 for Python 3.5.
|
||||||
"""
|
"""
|
||||||
@@ -168,7 +168,7 @@ class Python35Parser(Python34Parser):
|
|||||||
call_token = tokens[i+1]
|
call_token = tokens[i+1]
|
||||||
rule = 'call ::= expr unmapexpr ' + call_token.kind
|
rule = 'call ::= expr unmapexpr ' + call_token.kind
|
||||||
self.addRule(rule, nop_func)
|
self.addRule(rule, nop_func)
|
||||||
elif opname == 'BEFORE_ASYNC_WITH' and self.version < 3.8:
|
elif opname == 'BEFORE_ASYNC_WITH' and self.version < (3, 8):
|
||||||
# Some Python 3.5+ async additions
|
# Some Python 3.5+ async additions
|
||||||
rules_str = """
|
rules_str = """
|
||||||
stmt ::= async_with_stmt
|
stmt ::= async_with_stmt
|
||||||
|
@@ -20,6 +20,7 @@ JUMP_OPS = opc.JUMP_OPS
|
|||||||
class Scanner36(Scanner3):
|
class Scanner36(Scanner3):
|
||||||
|
|
||||||
def __init__(self, show_asm=None, is_pypy=False):
|
def __init__(self, show_asm=None, is_pypy=False):
|
||||||
|
Scanner3.__init__(self, (3, 6), show_asm, is_pypy)
|
||||||
return
|
return
|
||||||
|
|
||||||
def ingest(self, co, classname=None, code_objects={}, show_asm=None):
|
def ingest(self, co, classname=None, code_objects={}, show_asm=None):
|
||||||
|
Reference in New Issue
Block a user