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 Mark Cline
Recipients Mark Cline
Date 2015-12-22.22:55:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450824910.44.0.997186762869.issue25929@psf.upfronthosting.co.za>
In-reply-to
Content
The Title might be a bit awkward but this is what I mean:

before = ',,,,'
after = before.replace(',,', ',null,')
print(after)
>,null,,null,

I suspect it is starting the second search at the start of the first find + length of the find? ie:
,,,,
0123
Starting the next search at spot 2 (the 3rd ,).

This might be expected behaviour as it is looking at the rest of the string after finding the match, as opposed to taking the updated string:
,null,,, after the first replace. (Actually, writing that out it does make sense that it would behave like this, but thought I would mention just in case I am missing something). 

[Its easy enough to work around it, but just thought I would mention it :D]
History
Date User Action Args
2015-12-22 22:55:10Mark Clinesetrecipients: + Mark Cline
2015-12-22 22:55:10Mark Clinesetmessageid: <1450824910.44.0.997186762869.issue25929@psf.upfronthosting.co.za>
2015-12-22 22:55:10Mark Clinelinkissue25929 messages
2015-12-22 22:55:10Mark Clinecreate