D14062: Python: fix escapes in quoted-comments
noreply at phabricator.kde.org
Thu Jul 12 07:46:46 BST 2018
nibags created this revision.
Restricted Application added projects: Kate, Frameworks.
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.
nibags requested review of this revision.
Bug #386685: https://bugs.kde.org/show_bug.cgi?id=386685
Escape characters are not detected in triple-quote comments.
Comments in quotes are literal strings that do not have assignment or operations, so the interpreter ignores them. These are also used to associate documentation with objects, using the `__doc__` attribute (Docstrings ).
Comments in quotes support the same escapes as normal string. Also, since these can be used as documentation strings, I believe that the correct way is to use the same string escape highlight.
-  Python. PEP 257 -- Docstring Conventions: https://www.python.org/dev/peps/pep-0257/
-  Python docstrings: http://www.pythonforbeginners.com/basics/python-docstrings
R216 Syntax Highlighting
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel