The documentation for Python 2.7 lists string.find as a deprecated function but does not (unlike atoi and atol) provide an alternative.
I’m coding in 2.7 at the moment so I’m happy to use it but I would like to know:
- what is it going to be replaced with?
- is that usable in 2.7 (if so, I’ll use it now so as to avoid recoding later)?
Almost the entire
stringmodule has been moved to thestrtype as method functions.Why are you using the
stringmodule, when almost everything you need is already part of the string type?http://docs.python.org/library/stdtypes.html#str.find
The string type — and it’s methods — is not deprecated. Indeed, it will me morphed to include Unicode in Python 3.