[Python-checkins] cpython (merge 3.2 -> default): Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
ned.deily
python-checkins at python.org
Wed Dec 7 10:14:55 CET 2011
http://hg.python.org/cpython/rev/e49220f4c31f
changeset: 73878:e49220f4c31f
parent: 73876:daaacc0ec584
parent: 73877:3822c8087d70
user: Ned Deily <nad at acm.org>
date: Wed Dec 07 01:12:50 2011 -0800
summary:
Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
(Patch by Tal Einat)
files:
Lib/idlelib/ColorDelegator.py | 8 ++++----
Misc/ACKS | 1 +
Misc/NEWS | 3 +++
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py
--- a/Lib/idlelib/ColorDelegator.py
+++ b/Lib/idlelib/ColorDelegator.py
@@ -20,10 +20,10 @@
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"
comment = any("COMMENT", [r"#[^\n]*"])
- sqstring = r"(\b[rRuU])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
- dqstring = r'(\b[rRuU])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
- sq3string = r"(\b[rRuU])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
- dq3string = r'(\b[rRuU])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
+ sqstring = r"(\b[rRbB])?'[^'\\\n]*(\\.[^'\\\n]*)*'?"
+ dqstring = r'(\b[rRbB])?"[^"\\\n]*(\\.[^"\\\n]*)*"?'
+ sq3string = r"(\b[rRbB])?'''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?"
+ dq3string = r'(\b[rRbB])?"""[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?'
string = any("STRING", [sq3string, dq3string, sqstring, dqstring])
return kw + "|" + builtin + "|" + comment + "|" + string +\
"|" + any("SYNC", [r"\n"])
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -275,6 +275,7 @@
John Edmonds
Grant Edwards
John Ehresman
+Tal Einat
Eric Eisner
Andrew Eland
Julien Élie
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -406,6 +406,9 @@
Library
-------
+- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
+ Patch by Tal Einat.
+
- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
by Jon Kuhn.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list