Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(269)

#3665: Support \u and \U escapes in regexes

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 months, 4 weeks ago by georg
Modified:
11 months, 1 week ago
Reviewers:
storchaka
CC:
Georg, ishimoto, AntoinePitrou, timehorse_users.sourceforge.net, ezio.melotti, eric.araujo, mrabarnett, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 5

Patch Set 3 #

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/re.rst View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
Lib/sre_parse.py View 1 2 3 5 chunks +49 lines, -17 lines 0 comments Download
Lib/test/test_re.py View 1 2 3 1 chunk +83 lines, -15 lines 0 comments Download

Messages

Total messages: 1
storchaka
11 months, 2 weeks ago #1
http://bugs.python.org/review/3665/diff/5054/Lib/sre_parse.py
File Lib/sre_parse.py (right):

http://bugs.python.org/review/3665/diff/5054/Lib/sre_parse.py#newcode264
Lib/sre_parse.py:264: if c > sys.maxunicode:
Since 3.3 sys.maxunicode is always 0x10FFFF.

http://bugs.python.org/review/3665/diff/5054/Lib/sre_parse.py#newcode497
Lib/sre_parse.py:497: if lo > sys.maxunicode or hi > sys.maxunicode:
It will never happen. Checking is done in _class_escape.

http://bugs.python.org/review/3665/diff/5054/Lib/sre_parse.py#newcode702
Lib/sre_parse.py:702: if code[0] == LITERAL and code[1] > sys.maxunicode:
It will never happen. Checking is done in _escape.

http://bugs.python.org/review/3665/diff/5054/Lib/test/test_re.py
File Lib/test/test_re.py (right):

http://bugs.python.org/review/3665/diff/5054/Lib/test/test_re.py#newcode536
Lib/test/test_re.py:536: self.assertNotEqual(re.match(r"\u1234", "\u1234"),
None)
assertIsNotNone

http://bugs.python.org/review/3665/diff/5054/Lib/test/test_re.py#newcode554
Lib/test/test_re.py:554: if sys.maxunicode <= 0xffff:
Since 3.3 sys.maxunicode is always 0x10FFFF.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7