diff Objects/stringobject.c @ 28581:c2ad62f4ea9b 2.2

Backport: Fix SF bug #697220, string.strip implementation/doc mismatch Attempt to make all the various string/unicode *strip methods the same. * Doc - add doc for when functions were added * UserString * string/unicode object methods * string module functions 'chars' is used for the last parameter everywhere.
author Neal Norwitz <nnorwitz@gmail.com>
date Fri, 11 Apr 2003 18:21:22 +0000
parents b30fe4dcc697
children
line wrap: on
line diff
--- a/Objects/stringobject.c	Thu Apr 10 20:30:18 2003 +0000
+++ b/Objects/stringobject.c	Fri Apr 11 18:21:22 2003 +0000
@@ -1523,12 +1523,12 @@
 
 
 static char strip__doc__[] =
-"S.strip([sep]) -> string or unicode\n\
+"S.strip([chars]) -> string or unicode\n\
 \n\
 Return a copy of the string S with leading and trailing\n\
 whitespace removed.\n\
-If sep is given and not None, remove characters in sep instead.\n\
-If sep is unicode, S will be converted to unicode before stripping";
+If chars is given and not None, remove characters in chars instead.\n\
+If chars is unicode, S will be converted to unicode before stripping";
 
 static PyObject *
 string_strip(PyStringObject *self, PyObject *args)
@@ -1541,11 +1541,11 @@
 
 
 static char lstrip__doc__[] =
-"S.lstrip([sep]) -> string or unicode\n\
+"S.lstrip([chars]) -> string or unicode\n\
 \n\
 Return a copy of the string S with leading whitespace removed.\n\
-If sep is given and not None, remove characters in sep instead.\n\
-If sep is unicode, S will be converted to unicode before stripping";
+If chars is given and not None, remove characters in chars instead.\n\
+If chars is unicode, S will be converted to unicode before stripping";
 
 static PyObject *
 string_lstrip(PyStringObject *self, PyObject *args)
@@ -1558,11 +1558,11 @@
 
 
 static char rstrip__doc__[] =
-"S.rstrip([sep]) -> string or unicode\n\
+"S.rstrip([chars]) -> string or unicode\n\
 \n\
 Return a copy of the string S with trailing whitespace removed.\n\
-If sep is given and not None, remove characters in sep instead.\n\
-If sep is unicode, S will be converted to unicode before stripping";
+If chars is given and not None, remove characters in chars instead.\n\
+If chars is unicode, S will be converted to unicode before stripping";
 
 static PyObject *
 string_rstrip(PyStringObject *self, PyObject *args)