[Python-Dev] Mini-Pep: An Empty String ABC (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Tue Jun 3 10:44:29 CEST 2008


Raymond Hettinger <python rcn.com> writes:

By subclassing Sequence, we get index() and count() mixins for free.

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.



More information about the Python-Dev mailing list