[Python-3000] find -> index patch (original) (raw)
Jack Diederich jack at psynchronous.com
Wed Aug 23 23:39:25 CEST 2006
- Previous message: [Python-3000] find -> index patch
- Next message: [Python-3000] find -> index patch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Aug 23, 2006 at 02🔞59PM -0700, Guido van Rossum wrote:
Here's the patch (by Hasan Diwan, BTW) for people's perusal. It just gets rid of all uses of find/rfind from Lib; it doesn't actually modify stringobject.c or unicodeobject.c. It doesn't use [r]partition()'; someone could look for opportunities to use that separately.
Is this a machine generated patch? Changing all calls to find with try: i = text.index(sep) except: i = -1 has a Yuck factor of -1000. Some of the excepts specify ValueError, but still.
-Jack
- Previous message: [Python-3000] find -> index patch
- Next message: [Python-3000] find -> index patch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]