[Python-ideas] Deprecate str.find

Ethan Furman ethan at stoneleaf.us
Fri Jul 15 19:30:50 CEST 2011


Mike Graham wrote:
> str.find (and bytes.find) is worse than the alternatives in every way.

I disagree.

> Additionally, the existence of str.find violates the
> there's-one-way-to-do-it principle.


The principle is  "One *Obvious* Way To Do It"  not  *Only* One Way. 
Sometimes which one is 'obvious' is only clear from reading the 
documentation or learning the language in some other way -- but that 
doesn't mean it always the _better_ way.

I, for one, have zero interest in losing good functionality because 
somebody else is misusing a feature.

Exceptions are not /always/ the best way to do something.

~Ethan~



More information about the Python-ideas mailing list