homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Alcolo Alcolo, ezio.melotti, martin.panter, mrabarnett, r.david.murray, serhiy.storchaka
Date 2017年12月02日.10:50:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512211848.04.0.213398074469.issue25054@psf.upfronthosting.co.za>
In-reply-to
Content
The new "finditer" behaviour seems to contradict the documentation about excluding empty matches if they touch the start of another match.
>>> list(re.finditer(r"\b|:+", "a::bc"))
[<re.Match object; span=(0, 0), match=''>, <re.Match object; span=(1, 1), match=''>, <re.Match object; span=(1, 3), match='::'>, <re.Match object; span=(3, 3), match=''>, <re.Match object; span=(5, 5), match=''>]
An empty match at (1, 1) is included, despite it touching the beginning of the match at (1, 3). My best guess is that when an empty match is found, searching continues at the same position for the first non-empty match.
History
Date User Action Args
2017年12月02日 10:50:48martin.pantersetrecipients: + martin.panter, ezio.melotti, mrabarnett, r.david.murray, serhiy.storchaka, Alcolo Alcolo
2017年12月02日 10:50:48martin.pantersetmessageid: <1512211848.04.0.213398074469.issue25054@psf.upfronthosting.co.za>
2017年12月02日 10:50:48martin.panterlinkissue25054 messages
2017年12月02日 10:50:47martin.pantercreate

AltStyle によって変換されたページ (->オリジナル) /