flâneur — a map of the web's best reading

Raw string highlighting · Issue #114 · MagicStack/MagicPython

github.com · 304 words · saved by 1 readers

VS Code version: 1.18.1 Python Extension version: 0.80.0 Python Version: CPython 3.5.4 32b OS and version: Windows 7 Pro SP1 x64 Actual behavior I have the following line and the r and \e shows in blue with the first ' and xplorer.exe ' shows in brown(?). My point is that it isn't recognizing it as a string (raw in this case) like it does with the previous 'SystemRoot' which shows all brown(?) and the Intellisense recognizes as a string. Expected behavior It should show r'\explorer.exe ' all brown(?) and recognize it as a string. I reported this first in VS Code Python at microsoft/vscode-python#337 (comment) but Brett Cannon told me to open it here because their syntax highlighting depends on MagicPython. Thanks, JM This is a feature. Hello, I'm sorry but I can't find that difference in the CPython spec. In fact what I find in both Py2 and Py3 official docs is: Both string and bytes literals may optionally be prefixed with a letter 'r' or 'R'; such strings are called raw strings and t

Explore this link on the map →

saved by

related reading