Lists And Missing Commas

Marco Sulla mail.python.org at marco.sulla.e4ward.com
Tue Dec 24 16:02:44 EST 2019


On Tue, 24 Dec 2019 at 19:05, Avi Gross via Python-list
<python-list at python.org> wrote:
> There are some lint programs that check your code and supply warnings and I
> see some languages have the option to generate warnings when the two strings
> are on the same line. I wonder if a Python lint does that. It may at least
> warn of this usage in time to check the code and put back the comma.

IMHO it's not something that should be delegated to linter, but to the
AST compiler itself. A SyntaxWarning should be displayed.

One time I spent HOURS because I forgot one single comma in a list of
strings. After that, my life is changed. I'm no more an ingenuous,
little boy, that trusted the stacktrace.


More information about the Python-list mailing list