[Python-ideas] Descouraging the implicit string concatenation
Paul Moore
p.f.moore at gmail.com
Wed Mar 14 12:29:33 EDT 2018
On 14 March 2018 at 15:10, Robert Vanden Eynde
<robertvandeneynde at hotmail.com> wrote:
> Indeed, linters are the place to go, but I think there is no
> "official" linter (am I wrong ?), are pyflakes and pylint independant
> projects ?
Ironically, many of the places I see implicit concatenation used are
where people need to work around linters complaining about line
lengths. I understand the benefits of projects that mandate code
passing lint checks, but I foresee sequences of commits:
"Modify error X to be clearer"
"Linter fix - split new message onto 2 lines to avoid long line"
"Linter fix - explicitly concatenate with + because implicit
concatenation is discouraged"
"Linter fix - go back to the old message because the stupid linter
complains about unnecessary addition of 2 constant values and I can't
be bothered any more"
Ok, the last one is a joke - but getting a set of rules that doesn't
back the programmer into a corner where it's non-obvious how to
achieve a simple goal could easily become a non-trivial task.
Paul
More information about the Python-ideas
mailing list