[Python-Dev] string.find() again (was Re: timsort for jython)

Guido van Rossum guido@python.org
Tue, 06 Aug 2002 10:59:28 -0400


> Perhaps it makes sense to allow "'thon' in 'python'" to return True,
> but still have "[1,2] in [0,1,2,3]" return False if we loosen the
> steadfast requirement that strings and lists be as much alike as
> possible.

That was never a requirement.  Strings and lists are merely similar
insofar as they have very similar needs for a slicing and subscripting
notation, and to a lesser extent for concatenation, repetition and
comparison.

Note that the sets of methods supported are almost entirely distinct
(only count and index are shared).

--Guido van Rossum (home page: http://www.python.org/~guido/)