Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I agree with Lambert.
Am rejecting this one on the basis that it adds too little value, is too
easily accomplished with pure python, and that it makes the list of
string methods unnecessarily more complex and harder to learn.
--
n
Zach Hirsch <[EMAIL PROTECTED]> added the comment:
Sounds good to me, except for one thing: define "sensible".
To me, lstrips seems sensible, since it's a recurring pattern that I've
used in multiple locations. But perhaps my sense of sensibility is warped :)
___
David W. Lambert <[EMAIL PROTECTED]> added the comment:
Opinion---"Batteries included" doesn't mean "a bewildering variety of
functions". Nor does it mean "my programming language has a checklist
of features" such as I recall the spreadsheet and word processor wars of
the (19)80's. Python s
Zach Hirsch <[EMAIL PROTECTED]> added the comment:
Thanks for taking a look.
Yea, it's pretty easy to write it in Python, but I've found that I've
needed it in quite a few things that I've worked on, so I thought it
might be useful in Python itself.
I've updated the patch to fix the reference l
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
I cannot say if this new set of function is desirable in python, but I know
that
I already needed this feature sometimes.
It's very easy to write in python code, though:
def rstrips(s, suffix):
if suffix and s.endswith(suffix):
New submission from Zach Hirsch <[EMAIL PROTECTED]>:
I've found that having a way to strip a leading substring from a string
is convienent. I've also gotten bitten by the fact that str.strip takes
a sequence of characters to remove from the beginning -- not a full string.
I've attached a patch t