Message83122
Confirmed in trunk and py3k. Changing to RFE, set it to behavior if you
disagree.
Python 2.4 does return "" for str.replace("", "", "asdf", -1), the
change happened in rev46226, with the effbot adding this snippet (by
Andrew Dalke?):
if (maxcount < 0) {
maxcount = PY_SSIZE_T_MAX;
} else if (maxcount == 0 || PyString_GET_SIZE(self) == 0) {
/* nothing to do; return the original string */
return return_self(self);
}
I'm not sure the current behavior can be considered better than what
David proposes, but I also wonder whether it matters at all. |
|
Date |
User |
Action |
Args |
2009-03-04 14:56:11 | ajaksu2 | set | recipients:
+ ajaksu2, dmajnemer |
2009-03-04 14:56:10 | ajaksu2 | set | messageid: <1236178570.82.0.0125442604814.issue5416@psf.upfronthosting.co.za> |
2009-03-04 14:56:06 | ajaksu2 | link | issue5416 messages |
2009-03-04 14:56:05 | ajaksu2 | create | |
|