[Python-checkins] python/dist/src/Objects stringobject.c,2.147.6.12,2.147.6.13 unicodeobject.c,2.124.6.20,2.124.6.21

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Fri, 11 Apr 2003 11:21:29 -0700


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

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



Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.147.6.12
retrieving revision 2.147.6.13
diff -C2 -d -r2.147.6.12 -r2.147.6.13
*** stringobject.c	2 Jan 2003 22:08:34 -0000	2.147.6.12
--- stringobject.c	11 Apr 2003 18:21:13 -0000	2.147.6.13
***************
*** 1524,1533 ****
  
  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 *
--- 1524,1533 ----
  
  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 *
***************
*** 1542,1550 ****
  
  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 *
--- 1542,1550 ----
  
  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 *
***************
*** 1559,1567 ****
  
  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 *
--- 1559,1567 ----
  
  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 *

Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.124.6.20
retrieving revision 2.124.6.21
diff -C2 -d -r2.124.6.20 -r2.124.6.21
*** unicodeobject.c	11 Feb 2003 23:19:29 -0000	2.124.6.20
--- unicodeobject.c	11 Apr 2003 18:21:22 -0000	2.124.6.21
***************
*** 4570,4579 ****
  
  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 *
--- 4570,4579 ----
  
  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 *
***************
*** 4588,4596 ****
  
  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 *
--- 4588,4596 ----
  
  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 *
***************
*** 4605,4613 ****
  
  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 *
--- 4605,4613 ----
  
  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 *