Another Wart! string.find() [ was: namespace issue? ]

Chuck Esterbrook ChuckEsterbrook at yahoo.com
Thu Jun 21 21:43:42 EDT 2001


"Steven D. Majewski" <sdm7g at Virginia.EDU> wrote in message news:<mailman.993163773.29922.python-list at python.org>...
[snip]
>   This is an illogical convention, however it would be very difficult
>   to root out, because, as you have noted, everyones code is FULL 
>   of explicit checks that string.find does not return -1. 
> 
> 
>   I'ld love to see it fixed, however, I suspect that in this case, 
>   many lines of installed code trumps Computer Programming for Everybody! 
> 
> 
>  -- Steve Majewski


So is it a flaw, relative to CP4E, that sequences start at index 0
instead of 1? An 'everybody' kind of person would think of the "first"
element as e[1]. Only someone familiar with pointer arithmetic from C
or assembly would think that "first" is 0.

Sorry if that already made the "list of flaws".


-Chuck



More information about the Python-list mailing list