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

#22578: Add addition attributes to re.error

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years ago by storchaka+cpython
Modified:
5 years ago
Reviewers:
ezio.melotti
CC:
AntoinePitrou, ezio.melotti, mrabarnett, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 #

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 1 chunk +25 lines, -2 lines 0 comments Download
Lib/sre_constants.py View 1 2 3 1 chunk +28 lines, -1 line 0 comments Download
Lib/sre_parse.py View 1 2 3 24 chunks +80 lines, -57 lines 0 comments Download
Lib/test/test_re.py View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 2
ezio.melotti
The RFE sounds reasonable to me, but I would like to see some tests for ...
5 years ago #1
storchaka_gmail.com
5 years ago #2
http://bugs.python.org/review/22578/diff/13007/Doc/library/re.rst
File Doc/library/re.rst (right):

http://bugs.python.org/review/22578/diff/13007/Doc/library/re.rst#newcode739
Doc/library/re.rst:739: The unformatted error message
On 2014/10/08 14:58:20, ezio.melotti wrote:
> Isn't this equivalent to str(err)?  If it is and you think it's necessary to
> expose it as an attribute, this equivalence should be mentioned, since it's
not
> clear what "unformatted error message" is.

No, this is not equivalent, it doesn't include an information about position "
at position XXX (line YYY, column ZZZ)". This is similar to the strerror
attribute of OSError.

Actually this sentence is copied from simplejson documentation. Could you please
suggest better wording?

http://bugs.python.org/review/22578/diff/13007/Doc/library/re.rst#newcode743
Doc/library/re.rst:743: The regular expression pattern.
On 2014/10/08 14:58:20, ezio.melotti wrote:
> This is the only sentence with a full stop at the end.

Indeed. All other sentences are copied from simplejson documentation (see
issue19361), and this one I had edited. Should I add or remove periods in all
sentences? Or you can suggest different formatting?

http://bugs.python.org/review/22578/diff/13007/Lib/sre_parse.py
File Lib/sre_parse.py (right):

http://bugs.python.org/review/22578/diff/13007/Lib/sre_parse.py#newcode251
Lib/sre_parse.py:251: DeprecationWarning, stacklevel=2)
On 2014/10/08 14:58:20, ezio.melotti wrote:
> Unrelated, but is there an issue for this?

Not yet.
Sign in to reply to this message.

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