Localize call_kw precedence to 3.6

This commit is contained in:
rocky
2018-03-22 14:21:36 -04:00
parent df55ce3212
commit 28bfb453f5
2 changed files with 5 additions and 2 deletions

View File

@@ -381,7 +381,6 @@ PRECEDENCE = {
'ret_cond_not': 28,
'_mklambda': 30,
'call_kw': 100, # 100 seems to to be module/function precidence
'yield': 101,
'yield_from': 101
}

View File

@@ -17,7 +17,7 @@
"""
from uncompyle6.semantics.consts import (
INDENT_PER_LEVEL, TABLE_R, TABLE_DIRECT)
PRECEDENCE, INDENT_PER_LEVEL, TABLE_R, TABLE_DIRECT)
from uncompyle6.semantics.make_function import (
make_function3_annotate,
@@ -353,6 +353,10 @@ def customize_for_version(self, is_pypy, version):
# Python 3.6+ Additions
#######################
# Value 100 is important; it is exactly
# module/function precidence.
PRECEDENCE['call_kw'] = 100
TABLE_DIRECT.update({
'tryfinally36': ( '%|try:\n%+%c%-%|finally:\n%+%c%-\n\n',
(1, 'returns'), 3 ),