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

#17087: Improve the repr for regular expression match objects

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 3 months ago by raymond.hettinger
Modified:
6 years, 1 month ago
Reviewers:
storchaka, ezio.melotti, pcmanticore
CC:
rhettinger, ezio.melotti, mrabarnett, cjerdonek, Claudiu.Popa, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 8

Patch Set 2 #

Total comments: 2

Patch Set 3 #

Total comments: 2

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Patch Set 7 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_re.py View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
Modules/_sre.c View 1 2 3 4 5 6 3 chunks +18 lines, -1 line 0 comments Download

Messages

Total messages: 7
storchaka_gmail.com
http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py File Lib/sre_constants.py (right): http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py#newcode260 Lib/sre_constants.py:260: f.write("#define SRE_MATCH_REPR_SIZE %d\n" % SRE_MATCH_REPR_SIZE) No need to expose ...
6 years, 2 months ago #1
ezio.melotti
http://bugs.python.org/review/17087/diff/9006/Lib/test/test_re.py File Lib/test/test_re.py (right): http://bugs.python.org/review/17087/diff/9006/Lib/test/test_re.py#newcode1060 Lib/test/test_re.py:1060: 'groups=1, span=\({} {}\), group0=test' On 2013/09/13 17:24:21, storchaka wrote: ...
6 years, 2 months ago #2
storchaka_gmail.com
On 2013/09/13 17:32:51, ezio.melotti wrote: > http://bugs.python.org/review/17087/diff/9006/Lib/test/test_re.py > File Lib/test/test_re.py (right): > > http://bugs.python.org/review/17087/diff/9006/Lib/test/test_re.py#newcode1060 > ...
6 years, 2 months ago #3
Claudiu.Popa
http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py File Lib/sre_constants.py (right): http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py#newcode260 Lib/sre_constants.py:260: f.write("#define SRE_MATCH_REPR_SIZE %d\n" % SRE_MATCH_REPR_SIZE) Ok. Also, the build ...
6 years, 2 months ago #4
storchaka_gmail.com
http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py File Lib/sre_constants.py (right): http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py#newcode260 Lib/sre_constants.py:260: f.write("#define SRE_MATCH_REPR_SIZE %d\n" % SRE_MATCH_REPR_SIZE) On 2013/09/13 18:55:36, Claudiu.Popa ...
6 years, 2 months ago #5
Claudiu.Popa
http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py File Lib/sre_constants.py (right): http://bugs.python.org/review/17087/diff/9006/Lib/sre_constants.py#newcode260 Lib/sre_constants.py:260: f.write("#define SRE_MATCH_REPR_SIZE %d\n" % SRE_MATCH_REPR_SIZE) I guess I'm missing ...
6 years, 2 months ago #6
storchaka_gmail.com
6 years, 1 month ago #7
http://bugs.python.org/review/17087/diff/9284/Modules/_sre.c
File Modules/_sre.c (right):

http://bugs.python.org/review/17087/diff/9284/Modules/_sre.c#newcode3638
Modules/_sre.c:3638: seq = PySequence_GetSlice(
Use the getslice() function. And don't forget decref seq after formatting
result.

http://bugs.python.org/review/17087/diff/9284/Modules/_sre.c#newcode3641
Modules/_sre.c:3641: "span=(%d %d), group0=%.50U...>",
I think "..." is redundant here. %.50R is more preferable than %.50U.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+