changeset: 73877:3822c8087d70 branch: 3.2 parent: 73873:b6b4d74b8d42 user: Ned Deily date: Wed Dec 07 01:08:35 2011 -0800 files: Lib/idlelib/ColorDelegator.py Misc/ACKS Misc/NEWS description: Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..". (Patch by Tal Einat) diff -r b6b4d74b8d42 -r 3822c8087d70 Lib/idlelib/ColorDelegator.py --- a/Lib/idlelib/ColorDelegator.py Tue Dec 06 20:46:57 2011 +0100 +++ b/Lib/idlelib/ColorDelegator.py Wed Dec 07 01:08:35 2011 -0800 @@ -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 -r b6b4d74b8d42 -r 3822c8087d70 Misc/ACKS --- a/Misc/ACKS Tue Dec 06 20:46:57 2011 +0100 +++ b/Misc/ACKS Wed Dec 07 01:08:35 2011 -0800 @@ -256,6 +256,7 @@ Rodolpho Eckhardt Grant Edwards John Ehresman +Tal Einat Eric Eisner Andrew Eland Julien Élie diff -r b6b4d74b8d42 -r 3822c8087d70 Misc/NEWS --- a/Misc/NEWS Tue Dec 06 20:46:57 2011 +0100 +++ b/Misc/NEWS Wed Dec 07 01:08:35 2011 -0800 @@ -90,6 +90,9 @@ Library ------- +- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..". + Patch by Tal Einat. + - tarfile.py: Correctly detect bzip2 compressed streams with blocksizes other than 900k.