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

Alex Coventry alex_c@MIT.EDU
27 Aug 2001 07:41:26 -0400


Sometimes I find myself wishing that strings had a method "substringp"
that would do basically what Eric wants, like

>>> 'cabcd'.substringp('ca')
1
>>> 'cabcd'.substringp('xx')
0

substringp would probably be the wrong name for it, though.

Alex.