Work around not having real flow-control analysis

This commit is contained in:
rocky 2017-06-29 20:29:41 -04:00
commit 0893652943
2 changed files with 6 additions and 3 deletions

View File

@ -900,11 +900,13 @@ class Scanner2(Scanner):
'start': start-3,
'end': pre_rtarget}
if self.version == 2.7:
elif self.version == 2.7:
self.structs.append({'type': 'if-then',
'start': start-3,
'end': pre_rtarget})
else:
# FIXME: this is yet another case were we need dominators.
if pre_rtarget not in self.linestartoffsets or self.version < 2.7:
self.not_continue.add(pre_rtarget)
if rtarget < end:

View File

@ -411,7 +411,8 @@ def make_function2(self, node, isLambda, nested=1, codeNode=None):
if code_has_star_star_arg(code):
if argc > 0:
self.write(', ')
self.write('**%s' % code.co_varnames[argc + kw_pairs])
if argc + kw_pairs > 0:
self.write('**%s' % code.co_varnames[argc + kw_pairs])
if isLambda:
self.write(": ")