Comma placement in 3.6 and 3.7 **kwargs

fixes #208
This commit is contained in:
rocky
2019-01-14 17:41:54 -05:00
parent 9a14db567b
commit 43646b3c71
3 changed files with 10 additions and 1 deletions

Binary file not shown.

View File

@@ -0,0 +1,9 @@
# Bug in Python 3.6 and 3.7 was getting comma before **kw
def fn(arg, *, kwarg='test', **kw):
assert arg == 1
assert kwarg == 'testing'
assert kw['foo'] == 'bar'
fn(1, kwarg='testing', foo='bar')

View File

@@ -735,7 +735,7 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
self.write(sep)
self.write("%s=%s" % (n, defaults[i]))
sep = ', '
ends_in_comma = True
ends_in_comma = False
pass
pass
pass