classification
Title: IDLE 3 doesn't highlights b"", but u""
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: ezio.melotti, lieryan, ned.deily, puzzlet, python-dev, roger.serwy, taleinat, terry.reedy
Priority: normal Keywords: patch

Created on 2010-05-07 06:16 by puzzlet, last changed 2011-12-07 09:17 by ned.deily. This issue is now closed.

Files
File name Uploaded Description Edit
IDLE_py3k_string_highlighting.diff taleinat, 2010-06-06 06:12 proposed patch review
Messages (8)
msg105184 - (view) Author: Puzzlet Chung (puzzlet) Date: 2010-05-07 06:16
IDLE 3.1.2 doesn't highlight b"" syntax, instead highlights u"".

Tested with IDLE (x86) 3.1.2 and Windows XP SP2.
msg105244 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-05-07 23:17
u'whatever' is not valid syntax for 3.x.
In any case, with IDLE on my WinXP 3.1.2 system, all string literals are green, with or without a leading b.

If you want this to stay open, cut and paste the opening header like
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32
and some actual code and specify what you see and what you think is wrong.
msg105254 - (view) Author: Puzzlet Chung (puzzlet) Date: 2010-05-08 03:06
> In any case, with IDLE on my WinXP 3.1.2 system, all string literals are green, with or without a leading b.

The letter b should also be green, while it shows the letter u from u'string' in green, which it shouldn't as it's not valid anymore.

Tested in IDLE with following version of Python:

Python 3.1.2 (r312:79149, Mar 20 2010, 22:55:39) [MSC v.1500 64 bit (AMD64)] on win32
msg107185 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2010-06-06 06:12
Attaching patch against current py3k branch.

I simply replaced the occurrences of [rRuU] in the relevant regexps to [rRbB].
msg107188 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-06-06 06:25
See also #7166.
msg148946 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2011-12-07 01:08
I applied the patch against the latest version in the repository and it works correctly.
msg148954 - (view) Author: Roundup Robot (python-dev) Date: 2011-12-07 09:14
New changeset 3822c8087d70 by Ned Deily in branch '3.2':
Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
http://hg.python.org/cpython/rev/3822c8087d70

New changeset e49220f4c31f by Ned Deily in branch 'default':
Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
http://hg.python.org/cpython/rev/e49220f4c31f
msg148955 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-12-07 09:17
Thanks for the patch, Tal, and thanks for testing it, Roger.  Applied to 3.2 for release in 3.2.3 and to default for 3.3.0.
History
Date User Action Args
2011-12-07 09:17:07ned.deilysetstatus: open -> closed

assignee: ned.deily
versions: - Python 3.1
nosy: + ned.deily

messages: + msg148955
resolution: works for me -> fixed
stage: resolved
2011-12-07 09:14:53python-devsetnosy: + python-dev
messages: + msg148954
2011-12-07 01:08:34roger.serwysetversions: + Python 3.2, Python 3.3
nosy: + roger.serwy

messages: + msg148946

type: behavior
2010-06-06 06:25:40ezio.melottisetnosy: + lieryan, ezio.melotti
messages: + msg107188
2010-06-06 06:12:40taleinatsetfiles: + IDLE_py3k_string_highlighting.diff

nosy: + taleinat
messages: + msg107185

keywords: + patch
2010-05-08 03:06:50puzzletsetstatus: pending -> open

messages: + msg105254
2010-05-07 23:17:24terry.reedysetstatus: open -> pending

nosy: + terry.reedy
messages: + msg105244

resolution: works for me
2010-05-07 06:16:33puzzletcreate