Skip to content

IDLE (python 3.1.1) syntax coloring for b'bytestring' and u'unicode' string literal #51415

Closed

Description

@lieryan
mannequin
BPO 7166
Nosy @taleinat, @ezio-melotti

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2010-06-06.06:25:33.436>
created_at = <Date 2009-10-18.19:34:27.551>
labels = ['easy', 'expert-IDLE', 'type-bug']
title = "IDLE (python 3.1.1) syntax coloring for b'bytestring' and u'unicode' string literal"
updated_at = <Date 2010-06-06.07:17:04.526>
user = 'https://bugs.python.org/lieryan'

bugs.python.org fields:

activity = <Date 2010-06-06.07:17:04.526>
actor = 'taleinat'
assignee = 'none'
closed = True
closed_date = <Date 2010-06-06.06:25:33.436>
closer = 'ezio.melotti'
components = ['IDLE']
creation = <Date 2009-10-18.19:34:27.551>
creator = 'lieryan'
dependencies = []
files = []
hgrepos = []
issue_num = 7166
keywords = ['easy']
message_count = 2.0
messages = ['94222', '107187']
nosy_count = 3.0
nosy_names = ['taleinat', 'ezio.melotti', 'lieryan']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue7166'
versions = ['Python 2.7', 'Python 3.2']

Activity

  1. lieryan commented on Oct 18, 2009

    lieryanmannequin
    MannequinAuthor

    On python trunk and 3.2 IDLE, the b in b'' is not green colored.
    On python 3.1 IDLE, the u in u'' is still colored, despite a SyntaxError.

    (sorry, I don't have diff installed on my Windows machine)

    Change on python trunk:
    /Lib/idlelib/ColorDelegator.py
    def make_pat():
    ....
    sqstring = r"(\b[rRuUbB])?'[^'\\\n](\\.[^'\\\n])'?"
    dqstring = r'(\b[rRuUbB])?"[^"\\\n]
    (\\.[^"\\\n])"?'
    sq3string = r"(\b[rRuUbB])?'''[^'\\]((\\.|'(?!''))[^'\\])(''')?"
    dq3string = r'(\b[rRuUbB])?"""[^"\\]
    ((\\.|"(?!""))[^"\\])(""")?'
    ....

    And on py3k branch:
    /Lib/idlelib/ColorDelegator.py
    def make_pat():
    ....
    sqstring = r"(\b[rRbB])?'[^'\\\n](\\.[^'\\\n])'?"
    dqstring = r'(\b[rRbB])?"[^"\\\n]
    (\\.[^"\\\n])"?'
    sq3string = r"(\b[rRbB])?'''[^'\\]((\\.|'(?!''))[^'\\])(''')?"
    dq3string = r'(\b[rRbB])?"""[^"\\]
    ((\\.|"(?!""))[^"\\])(""")?'
    ....

  2. ezio-melotti commented on Jun 6, 2010

    @ezio-melotti
    Member

    Duplicate of bpo-8641.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions