
Dec. 28, 2000
3:41 p.m.
On Thu, 28 Dec 2000 10:04:23 -0500, Guido <guido@digicool.com> wrote:
Someone just posted a patch to implement s.chomp() as a string method: ... Any comments? Is this needed given that we have s.rstrip() already?
I've always considered this a different operation from rstrip(). When you intend to be as surgical in your changes as possible, it is important *not* to use rstrip(). I don't feel strongly that it needs to be implemented in C, though I imagine people who do a lot of string processing feel otherwise. It's just hard to beat the performance difference if you are doing this a lot. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Digital Creations