Bug in string.find
Terry Reedy
tjreedy at udel.edu
Thu Sep 1 11:36:42 EDT 2005
"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:df6slb$4n8$1 at sea.gmane.org...
> [slice] indices point to the "gap" between items, not to the items
> themselves.
>
> positive indices start from the left end, negative indices from the
> righept end.
>
> straight indexing returns the item just to the right of the given gap
> (this is
> what gives you the perceived assymmetry), slices return all items between
> the given gaps.
Well said. In some languages, straight indexing returns the item to the
left instead. The different between items and gaps in seen in old
terminals and older screens versus modern gui screens. Then, a cursur sat
on top of or under a character space. Now, a cursur sits between chars.
Terry J. Reedy
More information about the Python-list
mailing list