Mike Lissner added the comment:
This is an old issue, but where I run into it frequently is when I use the
format function and string interpolation. For example, this throws a
SyntaxError:
"The name of the person is {name_first} {name_last}".format(
**my_obj.__dict__,
)
Because strings
Grégory Starck added the comment:
unneeded consistency
unneeded consistency !:?
I'd say that either there is a full or complete consistency on the mentionned
point/element of syntax, or there is none .. but an unneeded one.. or an
half-one, isn't consistent consistency by then ;)
Changes by Nick Coghlan ncogh...@gmail.com:
--
resolution: rejected - duplicate
superseder: - Allow trailing comma in any function argument list.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10682
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10682
___
___
Raymond Hettinger rhettin...@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
Brett Cannon br...@python.org added the comment:
I'm with Raymond; this is unneeded consistency. I honestly would rather see
what little support there is for a trailing comma to go away, but w/o looking
at the grammar I am willing to bet that would be a pain to get right and not be
worth the
Martin v. Löwis mar...@v.loewis.de added the comment:
Ok, so closing as rejected.
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10682
___
New submission from Jan Kaliszewski z...@chopin.edu.pl:
Let examples speak:
def x(a, z): pass # this is ok
def x(a, z,): pass # this is ok
def x(a, *, z): pass # this is ok in Py3k
def x(a, *, z,): pass # but this causes SyntaxError (!)
def x(a, *args): pass
Jan Kaliszewski z...@chopin.edu.pl added the comment:
s/**{5: 6}/**{'5': 6}/g (but it's a detail)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10682
___
Jan Kaliszewski z...@chopin.edu.pl added the comment:
Oops, I see the problem was partly addressed @ issue9232.
But:
* the proposed patch doesn't fix calls (but defs only),
* shouldn't be the issue considered as a bug -- and fixed also in 2.7 and 3.1?
--
Martin v. Löwis mar...@v.loewis.de added the comment:
It's clearly not a bug: the documented grammar matches the implemented grammar.
Asking for more abstract consistency is a feature request. This also clearly
falls under the PEP 3003 moratorium.
--
nosy: +loewis
type: behavior -
11 matches
Mail list logo