[issue43692] Raise SyntaxError on implicit string concatentation in list

Serhiy Storchaka report at bugs.python.org
Thu Apr 1 11:13:58 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It is valid Python syntax, so SyntaxErorr cannot be raised.

SyntaxWarning is an option, but the Python compiler only emits it if we absolutely sure that the code contains a bug (either it does not work as intended or can work differently on other implementations or in future Python releases). And I am afraid that a lot of correct code (including the stdlib) contains implicit string concatentation in list.

It is better to left such warning on third-party checkers which have options to control what warnings to emit, and not enable it by default.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43692>
_______________________________________


More information about the Python-bugs-list mailing list