Repository commit
791deb4
Python version (python --version)
3.14.4
Dependencies version (pip freeze)
pip==26.0.1
Expected behavior
In strings/split.py, the custom split function should not silently return the unsplit string when separator has multiple characters. It should raise a clear ValueError.
Actual behavior
File location
strings/split.py
Actual behavior
In strings/split.py, the custom split function compares each character in the input string with separator.
Because of that, a multi-character separator such as "--" is never matched:
split("a--b--c", separator="--")
Repository commit
791deb4
Python version (python --version)
3.14.4
Dependencies version (pip freeze)
pip==26.0.1
Expected behavior
In strings/split.py, the custom split function should not silently return the unsplit string when separator has multiple characters. It should raise a clear ValueError.
Actual behavior
File location
strings/split.pyActual behavior
In
strings/split.py, the customsplitfunction compares each character in the input string withseparator.Because of that, a multi-character separator such as
"--"is never matched: