1.1 --- a/translator.py Tue Nov 01 13:52:30 2016 +0100
1.2 +++ b/translator.py Tue Nov 01 18:23:42 2016 +0100
1.3 @@ -932,13 +932,11 @@
1.4
1.5 # Without a known specific callable, the expression provides the target.
1.6
1.7 - if not target:
1.8 - stages.append(str(expr))
1.9 + stages.append("__tmp_target = %s" % expr)
1.10
1.11 # Any specific callable is then obtained.
1.12
1.13 - else:
1.14 - stages.append("__tmp_target = %s" % expr)
1.15 + if target:
1.16 stages.append(target)
1.17
1.18 # With a known target, the function is obtained directly and called.
1.19 @@ -950,7 +948,7 @@
1.20 # the callable and argument collections.
1.21
1.22 else:
1.23 - output = "__invoke(\n(\n%s\n),\n%d, %d, %s, %s,\n%d, %s\n)" % (
1.24 + output = "(%s, __invoke(\n__tmp_target,\n%d, %d, %s, %s,\n%d, %s\n))" % (
1.25 ",\n".join(stages),
1.26 self.always_callable and 1 or 0,
1.27 len(kwargs), kwcodestr, kwargstr,