More 3.6 lambda handling

This commit is contained in:
rocky 2018-03-19 09:36:02 -04:00
parent 9e05750537
commit 6ab711baab
3 changed files with 10 additions and 1 deletions

Binary file not shown.

View File

@ -9,3 +9,12 @@ def __init__(self, msg = None, digestmod = None):
def bug():
def register(cls, func=None):
return lambda f: register(cls, f)
# From Python 3.6 configparser.py
def items(self, d, section=5, raw=False, vars=None):
if vars:
for key, value in vars.items():
d[self.optionxform(key)] = value
d = lambda option: self._interpolation.before_get(self,
section, option, d[option], d)
return

View File

@ -896,7 +896,7 @@ class Python3Parser(PythonParser):
else:
rule = ('mklambda ::= %s%s%s' %
('load_closure ' * closure,
'BUILD_TUPLE_2 LOAD_LAMBDA LOAD_CONST ',
'LOAD_LAMBDA LOAD_CONST ',
opname))
self.add_unique_rule(rule, opname, token.attr, customize)