[Python-checkins] python/dist/src/Objects stringobject.c,2.207,2.208 unicodeobject.c,2.186,2.187

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Thu, 10 Apr 2003 15:35:35 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv20253/Objects

Modified Files:
	stringobject.c unicodeobject.c 
Log Message:
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.


Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.207
retrieving revision 2.208
diff -C2 -d -r2.207 -r2.208
*** stringobject.c	9 Apr 2003 19:31:57 -0000	2.207
--- stringobject.c	10 Apr 2003 22:35:32 -0000	2.208
***************
*** 1771,1780 ****
  
  PyDoc_STRVAR(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 *
--- 1771,1780 ----
  
  PyDoc_STRVAR(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 *
***************
*** 1789,1797 ****
  
  PyDoc_STRVAR(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 *
--- 1789,1797 ----
  
  PyDoc_STRVAR(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 *
***************
*** 1806,1814 ****
  
  PyDoc_STRVAR(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 *
--- 1806,1814 ----
  
  PyDoc_STRVAR(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 *

Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.186
retrieving revision 2.187
diff -C2 -d -r2.186 -r2.187
*** unicodeobject.c	9 Apr 2003 19:32:45 -0000	2.186
--- unicodeobject.c	10 Apr 2003 22:35:32 -0000	2.187
***************
*** 5248,5257 ****
  
  PyDoc_STRVAR(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 *
--- 5248,5257 ----
  
  PyDoc_STRVAR(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 *
***************
*** 5266,5274 ****
  
  PyDoc_STRVAR(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 *
--- 5266,5274 ----
  
  PyDoc_STRVAR(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 *
***************
*** 5283,5291 ****
  
  PyDoc_STRVAR(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 *
--- 5283,5291 ----
  
  PyDoc_STRVAR(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 *