Index: Lib/string.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/string.py,v retrieving revision 1.60.16.4 diff -c -r1.60.16.4 string.py *** Lib/string.py 14 Nov 2002 03:32:08 -0000 1.60.16.4 --- Lib/string.py 30 Mar 2003 19:49:40 -0000 *************** *** 78,107 **** Return a copy of the string s with leading and trailing whitespace removed. ! If chars is given and not None, remove characters in sep instead. If chars is unicode, S will be converted to unicode before stripping. """ return s.strip(chars) # Strip leading tabs and spaces ! def lstrip(s): ! """lstrip(s) -> string Return a copy of the string s with leading whitespace removed. """ ! return s.lstrip() # Strip trailing tabs and spaces ! def rstrip(s): ! """rstrip(s) -> string ! Return a copy of the string s with trailing whitespace ! removed. """ ! return s.rstrip() # Split a string into a list of space/tab-separated words --- 78,110 ---- Return a copy of the string s with leading and trailing whitespace removed. ! If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping. """ return s.strip(chars) # Strip leading tabs and spaces ! def lstrip(s, chars=None): ! """lstrip(s [,chars]) -> string Return a copy of the string s with leading whitespace removed. + If chars is given and not None, remove characters in chars instead. + If chars is unicode, S will be converted to unicode before stripping. """ ! return s.lstrip(chars) # Strip trailing tabs and spaces ! def rstrip(s, chars=None): ! """rstrip(s [,chars]) -> string ! Return a copy of the string s with trailing whitespace removed. ! If chars is given and not None, remove characters in chars instead. ! If chars is unicode, S will be converted to unicode before stripping. """ ! return s.rstrip(chars) # Split a string into a list of space/tab-separated words Index: Objects/stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.147.6.12 diff -c -r2.147.6.12 stringobject.c *** Objects/stringobject.c 2 Jan 2003 22:08:34 -0000 2.147.6.12 --- Objects/stringobject.c 30 Mar 2003 19:49:42 -0000 *************** *** 1523,1534 **** static char strip__doc__[] = ! "S.strip([sep]) -> 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"; static PyObject * string_strip(PyStringObject *self, PyObject *args) --- 1523,1534 ---- static char strip__doc__[] = ! "S.strip([chars]) -> string or unicode\n\ \n\ Return a copy of the string S with leading and trailing\n\ whitespace removed.\n\ ! 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,1551 **** static char lstrip__doc__[] = ! "S.lstrip([sep]) -> 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"; static PyObject * string_lstrip(PyStringObject *self, PyObject *args) --- 1541,1551 ---- static char lstrip__doc__[] = ! "S.lstrip([chars]) -> string or unicode\n\ \n\ Return a copy of the string S with leading whitespace removed.\n\ ! 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,1568 **** static char rstrip__doc__[] = ! "S.rstrip([sep]) -> 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"; static PyObject * string_rstrip(PyStringObject *self, PyObject *args) --- 1558,1568 ---- static char rstrip__doc__[] = ! "S.rstrip([chars]) -> string or unicode\n\ \n\ Return a copy of the string S with trailing whitespace removed.\n\ ! 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) Index: Objects/unicodeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v retrieving revision 2.124.6.20 diff -c -r2.124.6.20 unicodeobject.c *** Objects/unicodeobject.c 11 Feb 2003 23:19:29 -0000 2.124.6.20 --- Objects/unicodeobject.c 30 Mar 2003 19:49:46 -0000 *************** *** 4569,4580 **** static char strip__doc__[] = ! "S.strip([sep]) -> 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"; static PyObject * unicode_strip(PyUnicodeObject *self, PyObject *args) --- 4569,4580 ---- static char strip__doc__[] = ! "S.strip([chars]) -> unicode\n\ \n\ Return a copy of the string S with leading and trailing\n\ whitespace removed.\n\ ! 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) *************** *** 4587,4597 **** static char lstrip__doc__[] = ! "S.lstrip([sep]) -> 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"; static PyObject * unicode_lstrip(PyUnicodeObject *self, PyObject *args) --- 4587,4597 ---- static char lstrip__doc__[] = ! "S.lstrip([chars]) -> unicode\n\ \n\ Return a copy of the string S with leading whitespace removed.\n\ ! 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) *************** *** 4604,4614 **** static char rstrip__doc__[] = ! "S.rstrip([sep]) -> 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"; static PyObject * unicode_rstrip(PyUnicodeObject *self, PyObject *args) --- 4604,4614 ---- static char rstrip__doc__[] = ! "S.rstrip([chars]) -> unicode\n\ \n\ Return a copy of the string S with trailing whitespace removed.\n\ ! 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)