summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 2d404b9..10257f7 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -1395,7 +1395,7 @@ string_translate(self, args)
strstr replacement for arbitrary blocks of memory.
- Locates the first occurance in the memory pointed to by MEM of the
+ Locates the first occurrence in the memory pointed to by MEM of the
contents of memory pointed to by PAT. Returns the index into MEM if
found, or -1 if not found. If len of PAT is greater than length of
MEM, the function returns -1.
@@ -1578,7 +1578,7 @@ string_replace(self, args)
return NULL;
if (sub_len <= 0) {
- PyErr_SetString(PyExc_ValueError, "empty replacement string");
+ PyErr_SetString(PyExc_ValueError, "empty pattern string");
return NULL;
}
new_s = mymemreplace(str,len,sub,sub_len,repl,repl_len,count,&out_len);