On Tuesday 16 August 2005 08:11, Lars Gullik Bjønnes wrote: > "Jose' Matos" <[EMAIL PROTECTED]> writes: > | You were right, as you can see here > | http://docs.python.org/lib/node110.html that version of rstrip was only > | introduced in 2.2.3, not before. So for 1.5.2 compatibility we should > | stay with the current scheme. The previous versions only removes > | whitespace. > > Does python offer function overloading?
No, but that is not a problem. Something like: try: rstrip("abc", "\r\n") except: def rstrip(s, char=" \t"): while 1: if not s: return s if s[-1] in char: s = s[:-1] else: return s > If so imho it would be better > to offer a compability function. But I also think that we should move > towards 2.2.x support in the next development round. That was always the plan, we have decided that 2 years ago in Chemnitz. > It seems quite ubiquitous to me now. I agree. PS: What about the patch? May I commit it? -- José Abílio Matos