python 2.6 grammar test tweak

This commit is contained in:
rocky
2018-04-16 13:00:30 -04:00
parent 245deb0931
commit 6c6d62edb8
3 changed files with 8 additions and 5 deletions

6
NEWS
View File

@@ -1,3 +1,9 @@
uncompyle6 3.1.3 2018-04-16
- Add some Python 3.7 rules, such as for handling LOAD_METHOD (not complete)
- Fix some fragment bugs
- small doc changes
uncompyle6 3.1.2 2018-04-08 Eastern Orthodox Easter uncompyle6 3.1.2 2018-04-08 Eastern Orthodox Easter
- Python 3.x subclass and call parsing fixes - Python 3.x subclass and call parsing fixes

View File

@@ -30,6 +30,8 @@ def test_grammar():
expect_lhs.add('kvlist') expect_lhs.add('kvlist')
expect_lhs.add('kv3') expect_lhs.add('kv3')
unused_rhs.add('dict') unused_rhs.add('dict')
elif PYTHON_VERSION == 2.6:
unused_rhs.add('call')
if PYTHON3: if PYTHON3:
expect_lhs.add('load_genexpr') expect_lhs.add('load_genexpr')

View File

@@ -595,11 +595,6 @@ class Python3Parser(PythonParser):
return_lambda LAMBDA_MARKER return_lambda LAMBDA_MARKER
""", nop_func) """, nop_func)
if self.version <= 3.6:
call_function1 = 'CALL_FUNCTION_1'
else:
call_function1 = 'CALL_METHOD_1'
has_get_iter_call_function1 = False has_get_iter_call_function1 = False
n = len(tokens) n = len(tokens)
max_branches = 0 max_branches = 0