Changes by Stéphane Henriot <shl...@gmail.com>:
--
nosy: +georg.brandl
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28029>
___
_
Stéphane Henriot added the comment:
I understand it might be a rather rare case.
Nevertheless, don't you think the inconsistency Serhiy pointed out makes it
look like a bug needing a fix?
--
___
Python tracker <rep...@bugs.python.org>
Stéphane Henriot added the comment:
Thanks for your help.
However, I'm not sure I would agree, regarding the correct behavior.
I guess the main question is « What is an occurrence? ».
Are you not convinced that in, count and find indicate occurrences?
To my understanding, the empty string
Stéphane Henriot added the comment:
For what it's worth, here is the behavior in PyPy 2.2.1
>>>> "".replace("", "prefix", 1)
'prefix'
>>>> "".replace("", "prefix")
'prefix'
--
___
New submission from Stéphane Henriot:
A few days ago, the following behavior surprised me.
>>> "".replace("", "prefix", 1)
''
>>> "".replace("", "prefix")
'prefix'
It seems to me this edge case isn't correctly docu