Message194397
Serhiy, I don't see the regexp '(?:.*$\n?)*' anywhere in doctest.py. Are you talking about the _EXAMPLE_RE regexp? That's the closest I see.
If that's the case, the "nothing to repeat" error is incorrect: _EXAMPLE_RE also contains a negative lookahead assertion '(?![ ]*$)' to ensure that the later '.*$\n?' part never tries to match an empty string.
That said, it takes some intelligence to realize that the negative lookahead assertion prevents repeating an empty match in this regexp, so it may not be easy to fix this false positive.
A compromise may be to replace
.*$\n?
with
.+$\n? | .*$\n
Both branches then "obviously" consume at least one character. |
|
Date |
User |
Action |
Args |
2013-08-04 17:19:27 | tim.peters | set | recipients:
+ tim.peters, pitrou, larry, ezio.melotti, mrabarnett, Arfrever, eli.bendersky, python-dev, serhiy.storchaka |
2013-08-04 17:19:27 | tim.peters | set | messageid: <1375636767.51.0.973205058605.issue18647@psf.upfronthosting.co.za> |
2013-08-04 17:19:27 | tim.peters | link | issue18647 messages |
2013-08-04 17:19:27 | tim.peters | create | |
|