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

#22578: Add addition attributes to re.error

Can't Edit
Can't Publish+Mail
Start Review
5 years, 3 months ago by storchaka+cpython
5 years, 3 months ago
AntoinePitrou, ezio.melotti, mrabarnett, devnull_psf.upfronthosting.co.za, storchaka

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


Total messages: 2
The RFE sounds reasonable to me, but I would like to see some tests for ...
5 years, 3 months ago #1
5 years, 3 months ago #2
File Doc/library/re.rst (right):

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
> 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?

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?

File Lib/sre_parse.py (right):

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+