Re: [Python-ideas] Deprecate str.find

Steven D'Aprano wrote: In my wishlist for Python 4000 I have:
and sooner would be nicer.
* list.index renamed to list.find * str.find and list.find return None if the argument is not found
+1 ...and forget throwing an exception if not found. None is much preferred.

On Tue, 2011-07-19 at 23:51 -0700, Larry Bugbee wrote:
This is my preference also. I also prefer that the ValueError exception not be overused in the library. A good test might be how to write a function that finds a substring in a substring from a larger string. Cheers, Ron

On Tue, 2011-07-19 at 23:51 -0700, Larry Bugbee wrote:
This is my preference also. I also prefer that the ValueError exception not be overused in the library. A good test might be how to write a function that finds a substring in a substring from a larger string. Cheers, Ron
participants (2)
-
Larry Bugbee
-
ron3200