[issue10682] With '*args' or even bare '*' in def/call argument list, trailing comma causes SyntaxError

Raymond Hettinger report at bugs.python.org
Sun Dec 12 20:59:12 CET 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

The current behavior for function definitions is beneficial because a trailing comma in the argument list is likely to signal a real error (omitted variable).

In contrast, the trailing comma for lists is useful because entries on separate lines in a repeating pattern that makes it easy to add or remove entries.

The use cases for both function definitions and lists are best served by the current behavior, more so that a notion driven by "foolish consistency".

Recommend rejecting and closing.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10682>
_______________________________________


More information about the Python-bugs-list mailing list