searching backwards in a string

Skip Montanaro skip at pobox.com
Tue Feb 12 23:33:11 EST 2002


    Paul> here 50000 and -1 are the starting and ending locations.

    Skip> If start > end isn't direction == -1 implied?

    Paul> Nope.  I tried it and it didn't search backwards.  

That wasn't quite what I was asking.  Let me ask it a slightly different
way.  Presuming the behavior can be changed so that searching in reverse
works, shouldn't the ordering of start and end be sufficient to indicate the
direction of the search?

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list