Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: Avoiding ZWM after a NWM in re.sub() is explicitly documented (and the documentation is correct in this case). This follows the behavior in the ancient RE implementation. Once it was broken in sre, but then fixed (see 21009b9c6fc40b25fcb30ee60d6108f235733e40, issue462270). Changing this behavior doesn't break anything in the stdlib except the specially purposed test. I think it is better to keep this behavior, but maybe discuss its changing (for making matching the behavior of other RE engines) in the separate issue.
I don't know how the behavior of findall() and finditer() is related to this. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue25054> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com