[Python-checkins] r46073 - python/trunk/Objects/stringobject.c python/trunk/Objects/unicodeobject.c

fredrik.lundh python-checkins at python.org
Mon May 22 17:35:14 CEST 2006


Author: fredrik.lundh
Date: Mon May 22 17:35:12 2006
New Revision: 46073

Modified:
   python/trunk/Objects/stringobject.c
   python/trunk/Objects/unicodeobject.c
Log:
docstring tweaks: count counts non-overlapping substrings, not
total number of occurences



Modified: python/trunk/Objects/stringobject.c
==============================================================================
--- python/trunk/Objects/stringobject.c	(original)
+++ python/trunk/Objects/stringobject.c	Mon May 22 17:35:12 2006
@@ -2159,9 +2159,9 @@
 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)

Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c	(original)
+++ python/trunk/Objects/unicodeobject.c	Mon May 22 17:35:12 2006
@@ -5078,8 +5078,8 @@
 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 *


More information about the Python-checkins mailing list