mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Fix unicode.rsplit()'s bug that ignores separater on the end of string when
using specialized splitter for 1 char sep.
This commit is contained in:
parent
0490fe96d8
commit
7fc4cf57b8
2 changed files with 3 additions and 1 deletions
|
@ -4294,7 +4294,7 @@ PyObject *rsplit_char(PyUnicodeObject *self,
|
|||
} else
|
||||
i--;
|
||||
}
|
||||
if (j >= 0) {
|
||||
if (j >= -1) {
|
||||
SPLIT_INSERT(self->str, 0, j + 1);
|
||||
}
|
||||
return list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue