Message275225
There may be related discussion in Issue 24243, also about searching for empty strings. A while ago I meant to add documetation and tests for that, but I lost momentum after cleaning up the existing tests.
Some of the behaviours are undocumented and surprising, but if you look at the implementation it is clear they are not accidental. E.g. I think there is a function called replace_interleave() or something.
IMO you can find an unlimited number of instances of an empty string at index zero of any string. So calls like "ABC".strip("") are sensible to raise an exception, and the interleave mode of "ABC".count("") is unexpected. But I don’t see a big need to change this existing behaviour as long as it is documented. |
|
Date |
User |
Action |
Args |
2016-09-09 00:29:45 | martin.panter | set | recipients:
+ martin.panter, vstinner, ericvw, r.david.murray, SilentGhost, serhiy.storchaka, Stéphane Henriot |
2016-09-09 00:29:45 | martin.panter | set | messageid: <1473380985.07.0.45484744591.issue28029@psf.upfronthosting.co.za> |
2016-09-09 00:29:44 | martin.panter | link | issue28029 messages |
2016-09-09 00:29:43 | martin.panter | create | |
|