[Python-Dev] Dafanging the find() gotcha
Andrew Koenig
ark@research.att.com
Mon, 5 Aug 2002 17:07:12 -0400 (EDT)
>> Changing the meaning of ('ab' in 'abc') might also break existing code.
Eric> I could construct a try/except case that would change, yes. Are you
Eric> being pedantic, or is this intended as a serious objection?
I think it's very nearly as serious as the objection that changing
the meaning of ('' in 'abc') might break code.
The reason for the "very nearly" is that is is easier to obtain empty
strings by accident than it is to obtain nonempty ones.