[Python-Dev] Re: Generalizing "in" to pairs of sequences

Barry A. Warsaw barry@zope.com
Tue, 28 Aug 2001 16:52:30 -0400


>>>>> "ESR" == Eric S Raymond <esr@thyrsus.com> writes:

    >>  substringp would probably be the wrong name for it, though.
    >>  Hmm, "hassubstring()"?

    ESR> How about "contains"?  E.g.

    | if a.contains(b):
    | 	# do stuff

Heh, and from there it's a small leap to a.__contains__(b), a.k.a.
"b in a".

Sneaky Eric, very sneaky. :)

-Barry