GNOME Bugzilla – Bug 637555
Support Python 3 bytes literals
Last modified: 2012-04-15 16:17:03 UTC
Hello, Python 3 has the notion of "bytes literals". They're written b"hello" and specify byte-strings. The complete specification is in http://docs.python.org/py3k/reference/lexical_analysis.html#string-and-bytes-literals Currently the 'b' in front of the string is not considered a part of the string for syntax highlighting. I suggest changing line 84 in python.lang from <define-regex id="raw-string-prefix">(r|ur|R|UR|Ur|uR)</define-regex> to <define-regex id="raw-string-prefix">(r|ur|R|UR|Ur|uR|b|B|br|Br|bR|BR)</define-regex> Thanks, Noam
can you provide a patch with git format-patch so that you will be properly credited?
Created attachment 187892 [details] [review] Patch to highlight Python 3 byte literals
Sorry for the delay - I'm not familiar with git. Here's the patch.
reopening the bug so that the patch will be reviewed and committed
Thanks! Sorry for my status change, I didn't know what the correct status should be, and resolved/incomplete didn't seem right.
We now have a python3.lang and I think this bug is fixed. Please reopen if that's not the case.