Message194412
I'm afraid it's just too tricky for the code to deduce that a negative lookahead assertion can imply that a later match can't be empty. But I don't know how smart the re compilation code already is ;-)
It occurs to me now that the doctest regexp could worm around this very easily, via replacing:
.*$\n?
with:
.+$\n?
The success of the negative lookahead assertion here doesn't _just_ imply that
.*$\n?
will match a non-empty string, it also implies that
.+$
will succeed (and so also that .+$\n? will succeed). |
|
Date |
User |
Action |
Args |
2013-08-04 19:34:49 | tim.peters | set | recipients:
+ tim.peters, pitrou, larry, ezio.melotti, mrabarnett, Arfrever, eli.bendersky, python-dev, serhiy.storchaka |
2013-08-04 19:34:49 | tim.peters | set | messageid: <1375644889.13.0.0630438600372.issue18647@psf.upfronthosting.co.za> |
2013-08-04 19:34:49 | tim.peters | link | issue18647 messages |
2013-08-04 19:34:48 | tim.peters | create | |
|