27 Aug
2005
27 Aug
'05
1:07 a.m.
"Raymond Hettinger"
Can str.find be listed in PEP 3000 (under builtins) for removal?
FWIW, here is a sample code transformation (extracted from zipfile.py). Judge for yourself whether the index version is better:
I am sure that we both could write similar code that would be smoother if the math module also had a 'powhalf' function that was the same as sqrt except for returning -1 instead of raising an error on negative or non-numerical input. I'll continue in response to Josiah... Terry J. Reedy