On Wed, Apr 11, 2012 at 9:56 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
On Thu, Apr 12, 2012 at 2:37 PM, Ben Finney <ben+python@benfinney.id.au> wrote:
> If the OP wants to specify different semantics, let's hear it.

Whatever semantics were chosen, they would end up being confusing to *someone*.

With prefix and suffix matching, the implicit OR is simple and
obvious. The same can't be said for the replacement command,
particular if it can be used with unordered collections.

Far better to leave this task to re.sub (which uses regex syntax to
avoid ambiguity) or to explicit flow control and multiple invocations
of replace().


Agreed.  Which is why I'm -1 on the proposed change to str.replace().