Commit 5a2b441a authored by Stefan Behnel's avatar Stefan Behnel

avoid minor redundancy in generated code

parent 55eb49a4
...@@ -2021,6 +2021,7 @@ class DefNode(FuncDefNode): ...@@ -2021,6 +2021,7 @@ class DefNode(FuncDefNode):
elif min_positional_args == max_positional_args: elif min_positional_args == max_positional_args:
# parse the exact number of positional arguments from the # parse the exact number of positional arguments from the
# args tuple # args tuple
if max_positional_args > 0:
code.putln('} else {') code.putln('} else {')
for i, arg in enumerate(positional_args): for i, arg in enumerate(positional_args):
item = "PyTuple_GET_ITEM(%s, %d)" % (Naming.args_cname, i) item = "PyTuple_GET_ITEM(%s, %d)" % (Naming.args_cname, i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment