On Sun, Sep 25, 2016 at 9:28 PM David Mertz <me...@gnosis.cx> wrote: > On Sep 25, 2016 10:59 AM, "אלעזר" <elaz...@gmail.com> wrote: > > 2. It is not naturally supported by syntax highlighters and IDEs. They > can be made to support it, but most will not. > > This is a complete red herring. Having a highlight rule of "apply > highlights in string annotations" is straightforward in modern editors. > This is like arguing Python should do <whatever> because Notepad.exe > doesn't do something smart with it. >
Not that I think it's a killer argument, but why a red herring? Quick search does not find such an explicit option in Gedit, PyDev and yes, Notepad++.exe. It is not a common or default option. Having such a rule by default amounts to admitting that these are not essentially strings, and the quotes there are overloaded. It also means that actual strings are not understood as such, and are incorrectly highlighted. But please let's not delve into this: it is of some importance, but should not affect an actual decision. IDEs are more important. Renaming facilities do over-renaming or under-renaming because of this need to rename inside some strings, but not inside others. Similarly code search facilities, and warnings from IDEs about inlining variables. I have encountered real bugs caused by such an imperfect renaming (and I hope your answer is not "don't do renaming"). A prefix like code"foo()" might help of course, but it is not really used as a string. Elazar
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/