summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-04-10 22:35:32 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-04-10 22:35:32 (GMT)
commitffe33b7f2416132d2e5b64683dbcc2aaf0596937 (patch)
treeba66fc78e483c14dc34b86a8f079d5b37268f03d /Objects
parent5c16c7b014f4cf975d25f667f6309933415e130d (diff)
downloadcpython-ffe33b7f2416132d2e5b64683dbcc2aaf0596937.zip
cpython-ffe33b7f2416132d2e5b64683dbcc2aaf0596937.tar.gz
cpython-ffe33b7f2416132d2e5b64683dbcc2aaf0596937.tar.bz2
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.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringobject.c18
-rw-r--r--Objects/unicodeobject.c18
2 files changed, 18 insertions, 18 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index ac4ad04..0425b1b 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)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 847580c..096dfcb 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5247,12 +5247,12 @@ do_argstrip(PyUnicodeObject *self, int striptype, PyObject *args)
PyDoc_STRVAR(strip__doc__,
-"S.strip([sep]) -> unicode\n\
+"S.strip([chars]) -> 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 a str, it will be converted to unicode before stripping");
+If chars is given and not None, remove characters in chars instead.\n\
+If chars is a str, it will be converted to unicode before stripping");
static PyObject *
unicode_strip(PyUnicodeObject *self, PyObject *args)
@@ -5265,11 +5265,11 @@ unicode_strip(PyUnicodeObject *self, PyObject *args)
PyDoc_STRVAR(lstrip__doc__,
-"S.lstrip([sep]) -> unicode\n\
+"S.lstrip([chars]) -> 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 a str, it will be converted to unicode before stripping");
+If chars is given and not None, remove characters in chars instead.\n\
+If chars is a str, it will be converted to unicode before stripping");
static PyObject *
unicode_lstrip(PyUnicodeObject *self, PyObject *args)
@@ -5282,11 +5282,11 @@ unicode_lstrip(PyUnicodeObject *self, PyObject *args)
PyDoc_STRVAR(rstrip__doc__,
-"S.rstrip([sep]) -> unicode\n\
+"S.rstrip([chars]) -> 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 a str, it will be converted to unicode before stripping");
+If chars is given and not None, remove characters in chars instead.\n\
+If chars is a str, it will be converted to unicode before stripping");
static PyObject *
unicode_rstrip(PyUnicodeObject *self, PyObject *args)