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 SilentGhost, Stéphane Henriot, ericvw, serhiy.storchaka, vstinner
Date 2016-09-08.21:26:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473369967.22.0.611421019211.issue28029@psf.upfronthosting.co.za>
In-reply-to
Content
Agreed with Stéphane. Since count() returns 1, resulting string should contain 1 replacement.

Using regular expressions:

>>> re.sub('', 'x', '')
'x'
>>> re.sub('', 'x', '', 1)
'x'
History
Date User Action Args
2016-09-08 21:26:07serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ericvw, SilentGhost, Stéphane Henriot
2016-09-08 21:26:07serhiy.storchakasetmessageid: <1473369967.22.0.611421019211.issue28029@psf.upfronthosting.co.za>
2016-09-08 21:26:07serhiy.storchakalinkissue28029 messages
2016-09-08 21:26:07serhiy.storchakacreate