After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637555 - Support Python 3 bytes literals
Support Python 3 bytes literals
Product: gtksourceview
Classification: Platform
Component: Syntax files
git master
Other All
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Reported: 2010-12-19 11:29 UTC by Noam Yorav-Raphael
Modified: 2012-04-15 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch to highlight Python 3 byte literals (934 bytes, patch)
2011-05-16 09:31 UTC, Noam Yorav-Raphael
none Details | Review

Description Noam Yorav-Raphael 2010-12-19 11:29:34 UTC

Python 3 has the notion of "bytes literals". They're written b"hello" and specify byte-strings. The complete specification is in

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>


   <define-regex id="raw-string-prefix">(r|ur|R|UR|Ur|uR|b|B|br|Br|bR|BR)</define-regex>

Comment 1 Paolo Borelli 2011-01-09 23:27:50 UTC
can you provide a patch with git format-patch so that you will be properly credited?
Comment 2 Noam Yorav-Raphael 2011-05-16 09:31:29 UTC
Created attachment 187892 [details] [review]
Patch to highlight Python 3 byte literals
Comment 3 Noam Yorav-Raphael 2011-05-16 09:32:36 UTC
Sorry for the delay - I'm not familiar with git. Here's the patch.
Comment 4 Paolo Borelli 2011-05-16 09:47:27 UTC
reopening the bug so that the patch will be reviewed and committed
Comment 5 Noam Yorav-Raphael 2011-05-16 10:40:12 UTC
Thanks! Sorry for my status change, I didn't know what the correct status should be, and resolved/incomplete didn't seem right.
Comment 6 Paolo Borelli 2012-04-15 16:17:03 UTC
We now have a python3.lang and I think this bug is fixed. Please reopen if that's not the case.