mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Whitespace normalization
This commit is contained in:
parent
f71ec5a0ac
commit
a7edb11122
1 changed files with 32 additions and 35 deletions
|
@ -1492,7 +1492,6 @@ string_split(PyStringObject *self, PyObject *args)
|
||||||
j = i+pos;
|
j = i+pos;
|
||||||
SPLIT_ADD(s, i, j);
|
SPLIT_ADD(s, i, j);
|
||||||
i = j + n;
|
i = j + n;
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
i = j = 0;
|
i = j = 0;
|
||||||
|
@ -2789,7 +2788,6 @@ replace_substring_in_place(PyStringObject *self,
|
||||||
offset = findstring(self_s, self_len,
|
offset = findstring(self_s, self_len,
|
||||||
from_s, from_len,
|
from_s, from_len,
|
||||||
0, self_len, FORWARD);
|
0, self_len, FORWARD);
|
||||||
|
|
||||||
if (offset == -1) {
|
if (offset == -1) {
|
||||||
/* No matches; return the original string */
|
/* No matches; return the original string */
|
||||||
return return_self(self);
|
return return_self(self);
|
||||||
|
@ -2838,7 +2836,6 @@ replace_single_character(PyStringObject *self,
|
||||||
self_len = PyString_GET_SIZE(self);
|
self_len = PyString_GET_SIZE(self);
|
||||||
|
|
||||||
count = countchar(self_s, self_len, from_c, maxcount);
|
count = countchar(self_s, self_len, from_c, maxcount);
|
||||||
|
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
/* no matches, return unchanged */
|
/* no matches, return unchanged */
|
||||||
return return_self(self);
|
return return_self(self);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue