[Python-Dev] string.find() again (was Re: timsort for jython)
Barry A. Warsaw
barry@python.org
Mon, 5 Aug 2002 12:41:35 -0400
>>>>> "A" == Aahz <aahz@pythoncraft.com> writes:
A> Well, of course it can't be changed, but if Tim of all people
A> made that mistake, I think it's a good indicator that
A> something's wrong. I believe the suggestion has been made to
A> add an exists() method or something similar; it's probably
A> better to have that in the core under some standard name
A> instead of each person who needs it implementing the one-liner
A> under different names.
What about extending `in' to allow strings longer than a single
character? E.g.
>>> 'lo' in 'hello world'
? That seems like the most natural way to want to spell it, and is an
extension of what you can already do.
-Barry