[Python-Dev] string.find() again (was Re: timsort for jython)
Guido van Rossum
guido@python.org
Mon, 05 Aug 2002 15:54:57 -0400
[SteveH]
> While I understand perfectly well the pragmatic case for this
> change, it appears to blur the borders between set membership and
> subsetting; if it's so desirable, why didn't the need arise
> earlier?.
Couldn't be done before __contains__ was a separately overloadable
operator. That's relatively recent (Python 2.0). And playing with it
in innovative ways is even more recent (Python 2.2, for "has_key").
But the satisfaction that spelling "has_key" as "in" gives me suggests
that there's more potential to it.
--Guido van Rossum (home page: http://www.python.org/~guido/)