Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type
Stefan Rank
stefan.rank at ofai.at
Thu Sep 1 07:29:00 EDT 2005
> [snipped alot from others about indexing, slicing problems,
> and the inadequacy of -1 as Not Found indicator]
on 31.08.2005 16:16 Ron Adam said the following:
> The problem with negative index's are that positive index's are zero
> based, but negative index's are 1 based. Which leads to a non
> symmetrical situations.
Hear, hear.
This is, for me, the root of the problem.
But changing the whole of Python to the (more natural and consistent)
one-based indexing style, for indexing from left and right, is...
difficult.
More information about the Python-list
mailing list