In <xns9c3bca27abc36duncanbo...@127.0.0.1> Duncan Booth 
<duncan.bo...@invalid.invalid> writes:
>So, for example:

>>>> re.compile("c").match("abcdef", 2)
><_sre.SRE_Match object at 0x0000000002C09B90>
>>>> re.compile("^c").search("abcdef", 2)
>>>>

I find this unconvincing; with re.search alone one could simply
do:

>>> re.compile("^c").search("abcdef"[2:])
<_sre.SRE_Match object at 0x75918>

No need for re.match(), at least as far as your example shows.

Maybe there are times when re.match() is more "convenient" in some
way, but it is awfully Perlish to "multiply language elements" for
the sake of this trifling convenience.

kynn
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to