[Python-ideas] Deprecate str.find

Cameron Simpson cs at zip.com.au
Sun Jul 17 01:17:33 CEST 2011


On 16Jul2011 15:52, Raymond Hettinger <raymond.hettinger at gmail.com> wrote:
| On Jul 16, 2011, at 3:15 PM, Devin Jeanpierre wrote:
| > Slicing was brought up as a use-case where you can use a default
| > without checking.
| 
| This thread has lost contact with reality.  It started with the
| reasonable observation that many uses of str.find could
| be replaced with a simple test using the in-operator.

To be fair here, Mike's OP also mentioned that -1 is easy to misuse if
not checked because it it still numeric.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Of course, I realize that the rain in the UK is much wetter than the rain
we get here...  - Eric Gunnerson <gunnerso at halcyon.com>



More information about the Python-ideas mailing list