Terry Reedy wrote:
str.find is an historical anomaly that should not be copied. It was(is?) a wrapper for C's string find function. C routinely uses -1 to mean None for functions statically typed to return ints. The Python version logically should return None and usually does for other functions.
Although Guido has defended it on the grounds that it can be inconvenient having a function that returns different types under different circumstances. Also it discourages making the mistake of treating the return value as a boolean. -- Greg -- http://mail.python.org/mailman/listinfo/python-list