On 23/08/06, Josiah Carlson <[EMAIL PROTECTED]> wrote:
...that looks to have been done by a script, it has inconsistant style
compared to the code it replaces, etc.

I made the minimal change that implements the functionality suggested, in terms of find/rfind, they return -1. The least painful way to replace it with index is:

try:
    i=str.index(foo)
except ValueError:
    i = -1

As for the plain except clauses, that was just laziness on my part. It's not meant to be stylistically consistent or beautiful, rather it is meant to be functional and as a starting point. Feel free to change/rewrite the patch. The GENERAL CASE, i.e. one that is applicable throughout the code is the try/except clauses shown above.
--
Cheers,
Hasan Diwan <[EMAIL PROTECTED]>
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to