[Python-ideas] Default return values to int and float

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Oct 5 08:08:47 CEST 2011


Guido van Rossum wrote:

> I'm out of ideas here. But of all these, str.find is probably still
> the worst -- I've flagged bugs caused by it too many times to count.

Could a with-statement be used here somehow?

     with finding(x, s) as i:
         ...

-- 
Greg




More information about the Python-ideas mailing list