rstrip vs. champ (was: python-dev summary, Dec. 16-31)

Simon Brunning SBrunning at trisystems.co.uk
Mon Jan 8 06:56:38 EST 2001


> From:	A.M. Kuchling [SMTP:akuchlin at mems-exchange.org]
> People have suggested adding a chomp() function that performs the same
> task as the Perl built-in: it removes the trailing newline from a
> string.  
> 	
> http://sourceforge.net/patch/?func=detailpatch&patch_id=103029&group_id=54
> 70
> 
> Reaction was mixed: Moshe liked it, but others thought that the
> existing rstrip() method, which removes *all* whitespace from the end
> of a string, is sufficient.
 
It would be even better if rstrip (and its siblings strip & lstrip) took an
optional argument specifying which characters to strip...

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.




More information about the Python-list mailing list