Closed as not planned
Description
Bug report
Proposal:
We should instead raise a ValueError:
$ ./python -c "import pydoc; pydoc.replace('text', 'a')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
import pydoc; pydoc.replace('text', 'a')
~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/projects/python/cpython/Lib/pydoc.py", line 266, in replace
text = pairs[1].join(text.split(pairs[0]))
~~~~~^^^
IndexError: tuple index out of range
Note
Since I changed the exception type, I won't backport this.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response