incorrect coloring of string literals in Python 3 and 2.7

Bug #690361 reported by Tal Einat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DreamPie
Undecided
Unassigned

Bug Description

In Python 2.7 and 3.x, in byte string literals, the 'b' character should be colored as part of the string.

In Python 3.x, a 'u' character before parenthesis cannot be part of the string literal, and so should not be colored as part of the string.

Revision history for this message
Tal Einat (taleinat) wrote :

Digging a bit, it seems to me that the syntax coloring is done by GtkSourceView, and we might have to update its Python language specifications for Python 3.

Revision history for this message
Noam Yorav-Raphael (noamraph) wrote :

I reported a bug at https://bugzilla.gnome.org/show_bug.cgi?id=637555, together with a suggestion on how to fix it.

Since it's a cosmetic thing, I don't think there's a reason to have a workaround until the bug is fixed.

I think that there should be one syntax highlighting file for both python 3 and python 2. Highlighting an illegal 'u' in front of a string in Python 3 doesn't seem to me to be that bad.

Changed in dreampie:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.