New submission from Andrej Klychin :
I saw that pablogsal welcomed improvments to the parser's suggestions, so here
are the messages for parameters and arguments lists I think should be written
instead of the current generic "invalid syntax".
>>> def foo(*arg,
Andrej Klychin added the comment:
I also sometimes write def foo(pos_only, /*, kwarg): pass. Perhaps this can be
special cased with
SyntaxError: expected comma between / and *
--
___
Python tracker
<https://bugs.python.org/issue46
Andrej Klychin added the comment:
@terry.reedy, I based that error message on current >>> foo(**{}, *())
SyntaxError: iterable argument unpacking follows keyword argument unpacking
and >>> foo(__debug__=True)
SyntaxError: cannot assign to __debug__
but the final erro
New submission from Andrej Klychin :
I'm not sure is it a bug or a fecature of comprehensions or eval, but
intuitively it seems like it should work.
def foo(baz):
return eval("[baz for _ in range(10)]")
foo(3)
Traceback (most recent call last):
File "", line