[Python-ideas] Deprecate str.find
Raymond Hettinger
raymond.hettinger at gmail.com
Sat Jul 16 17:26:37 CEST 2011
On Jul 15, 2011, at 6:57 AM, Mike Graham wrote:
> str.find (and bytes.find) is worse than the alternatives in every way.
> It should be explicitly deprecated in favour of str.__contains__ and
> str.index.
Unless an API is flat out broken, deprecation is almost always a bad idea.
This API has been around for a very long time, so deprecating it will
break lots of people's code for almost zero benefit:
http://www.google.com/codesearch#search/&q=%5C.find%5C(%20lang:%5Epython$&type=cs
Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110716/299b8cef/attachment.html>
More information about the Python-ideas
mailing list