[Python-Dev] Mini-Pep: An Empty String ABC

Raymond Hettinger python at rcn.com
Tue Jun 3 12:09:09 CEST 2008


From: "Antoine Pitrou" <solipsis at pitrou.net>
> It seems to me that Sequence.index()/count() and String.index()/count() 
> shouldn't have the same semantics.
> In the former case they search for items in the Sequence, in the latter case 
> they search for substrings of the String.

And the same applies to __contains__().


Raymond


More information about the Python-Dev mailing list