Indeed, linters are the place to go, but I think there is no "official" linter (am I wrong ?), are pyflakes and pylint independant projects ?
2018-03-14 16:03 GMT+01:00 Guido van Rossum <gvanros...@gmail.com>: > I use the feature regularly for long error messages, and when combined with > .format() or % it's not so easy to replace it with a + (it would require > adding parentheses). > > So I am against formally discouraging it or adding something to PEP 8. > > However linters could warn about lists of comma-separated strings with a > missing comma. > > On Wed, Mar 14, 2018, 07:54 Oleg Broytman <p...@phdru.name> wrote: >> >> On Thu, Mar 15, 2018 at 01:18:06AM +1100, Steven D'Aprano >> <st...@pearwood.info> wrote: >> > On Wed, Mar 14, 2018 at 02:31:58PM +0100, Oleg Broytman wrote: >> > > Once I stumbled over a bug caused by this in legacy code in >> > > production. Fixing it was quite painful! >> > >> > Did you mean that *finding* the bug was painful? Fixing it should be >> > trivially easy: add a comma. >> >> The most painful was that the bug destroyed important information >> that was hard to fix later (enterprise code in production, the code is >> certificated and hard to replace). >> >> The second pain was to understand what was going on. When a program >> report "The OID in the certificate doesn't belong to the proper root >> OID" it's simpler to decide that the certificate is wrong, not that the >> list of root OIDs to check is wrong. >> >> The third pain was to find the bug. It's hard to spot a problem in >> the list >> >> oids = [ >> "1.2.6.254.14." >> "19.9.91.281", >> "1.2.6.263.12." >> "481.7.9.6.3.87" >> "1.2.7.4.214.7." >> "9.1.52.12", >> ] >> >> There were about 50 OIDs like these, and the missing comma was in the >> middle of the list. >> >> > -- >> > Steve >> >> Oleg. >> -- >> Oleg Broytman http://phdru.name/ p...@phdru.name >> Programmers don't die, they just GOSUB without RETURN. >> _______________________________________________ >> Python-ideas mailing list >> Python-ideas@python.org >> https://mail.python.org/mailman/listinfo/python-ideas >> Code of Conduct: http://python.org/psf/codeofconduct/ > > > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/