]> granicus.if.org Git - python/commitdiff
docstring tweaks: count counts non-overlapping substrings, not
authorFredrik Lundh <fredrik@pythonware.com>
Mon, 22 May 2006 15:35:12 +0000 (15:35 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Mon, 22 May 2006 15:35:12 +0000 (15:35 +0000)
total number of occurences

Objects/stringobject.c
Objects/unicodeobject.c

index 536caeff972fa64cd0e6e7102eea053f3a32ef45..f3104ee66c3860c0cae4ff425be7f28487ed5591 100644 (file)
@@ -2159,9 +2159,9 @@ string_capitalize(PyStringObject *self)
 PyDoc_STRVAR(count__doc__,
 "S.count(sub[, start[, end]]) -> int\n\
 \n\
-Return the number of occurrences of substring sub in string\n\
-S[start:end].  Optional arguments start and end are\n\
-interpreted as in slice notation.");
+Return the number of non-overlapping occurrences of substring sub in\n\
+string S[start:end].  Optional arguments start and end are interpreted\n\
+as in slice notation.");
 
 static PyObject *
 string_count(PyStringObject *self, PyObject *args)
index a3af7f6a858a7e8c840b70c7a43992d9fe6db86a..7d11f7de34013f4c9620d59057c8e4c5dfebf05d 100644 (file)
@@ -5078,8 +5078,8 @@ onError:
 PyDoc_STRVAR(count__doc__,
 "S.count(sub[, start[, end]]) -> int\n\
 \n\
-Return the number of occurrences of substring sub in Unicode string\n\
-S[start:end].  Optional arguments start and end are\n\
+Return the number of non-overlapping occurrences of substring sub in\n\
+Unicode string S[start:end].  Optional arguments start and end are\n\
 interpreted as in slice notation.");
 
 static PyObject *