From d266ddca6589a9f27b766192235dea98b30e5d95 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 10 Apr 2003 22:35:32 +0000 Subject: Attempt to make all the various string *strip methods the same. * Doc - add doc for when functions were added * UserString * string object methods * string module functions 'chars' is used for the last parameter everywhere. These changes will be backported, since part of the changes have already been made, but they were inconsistent. --- Objects/stringobject.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Objects/stringobject.c') diff --git a/Objects/stringobject.c b/Objects/stringobject.c index ac4ad04f39..0425b1b143 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1770,12 +1770,12 @@ do_argstrip(PyStringObject *self, int striptype, PyObject *args) PyDoc_STRVAR(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) @@ -1788,11 +1788,11 @@ string_strip(PyStringObject *self, PyObject *args) PyDoc_STRVAR(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) @@ -1805,11 +1805,11 @@ string_lstrip(PyStringObject *self, PyObject *args) PyDoc_STRVAR(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) -- cgit v1.2.1