Ethan Furman added the comment:
The .replace() method is not recursive (it only makes one pass through the
string), so for example:
>>> example = ' ' # three spaces
>>> example = example.replace(' ', ' ') # replace two spaces with one space
>>> example # should be two spaces
' '
>>> example = example.replace(' ', ' ') # replace two spaces with one space
>>> example # should be one space
' '
----------
nosy: +ethan.furman
resolution: rejected -> not a bug
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26022>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com