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 serhiy.storchaka
Recipients ezio.melotti, mrabarnett, serhiy.storchaka, slomo
Date 2020-02-19.13:24:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582118692.07.0.121010831272.issue39687@roundup.psfhosted.org>
In-reply-to
Content
It is correct and documented behavior. ".*" matches two substrings: the whole string "bc" and an empty string at the end of the string.

See https://docs.python.org/3/library/re.html#re.sub and https://docs.python.org/3/whatsnew/3.7.html#changes-in-the-python-api.

The behavior before 3.7 was incorrect.
History
Date User Action Args
2020-02-19 13:24:52serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti, mrabarnett, slomo
2020-02-19 13:24:52serhiy.storchakasetmessageid: <1582118692.07.0.121010831272.issue39687@roundup.psfhosted.org>
2020-02-19 13:24:51serhiy.storchakalinkissue39687 messages
2020-02-19 13:24:51serhiy.storchakacreate