mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
docstring tweaks: count counts non-overlapping substrings, not
total number of occurences
This commit is contained in:
parent
b97597316b
commit
763b50f9d9
2 changed files with 5 additions and 5 deletions
|
@ -2159,9 +2159,9 @@ string_capitalize(PyStringObject *self)
|
||||||
PyDoc_STRVAR(count__doc__,
|
PyDoc_STRVAR(count__doc__,
|
||||||
"S.count(sub[, start[, end]]) -> int\n\
|
"S.count(sub[, start[, end]]) -> int\n\
|
||||||
\n\
|
\n\
|
||||||
Return the number of occurrences of substring sub in string\n\
|
Return the number of non-overlapping occurrences of substring sub in\n\
|
||||||
S[start:end]. Optional arguments start and end are\n\
|
string S[start:end]. Optional arguments start and end are interpreted\n\
|
||||||
interpreted as in slice notation.");
|
as in slice notation.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
string_count(PyStringObject *self, PyObject *args)
|
string_count(PyStringObject *self, PyObject *args)
|
||||||
|
|
|
@ -5078,8 +5078,8 @@ onError:
|
||||||
PyDoc_STRVAR(count__doc__,
|
PyDoc_STRVAR(count__doc__,
|
||||||
"S.count(sub[, start[, end]]) -> int\n\
|
"S.count(sub[, start[, end]]) -> int\n\
|
||||||
\n\
|
\n\
|
||||||
Return the number of occurrences of substring sub in Unicode string\n\
|
Return the number of non-overlapping occurrences of substring sub in\n\
|
||||||
S[start:end]. Optional arguments start and end are\n\
|
Unicode string S[start:end]. Optional arguments start and end are\n\
|
||||||
interpreted as in slice notation.");
|
interpreted as in slice notation.");
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue