[Python-Dev] PEP: Unicode Indexing Helper Module

M.-A. Lemburg mal at lemburg.com
Fri Jul 13 09:49:42 EDT 2001


Neil Hodgson wrote:
> 
> M.-A. Lemburg:
> >    next_<indextype>(u, index) -> integer
> >
> >        Returns the Unicode object index for the start of the next
> >        <indextype> found after u[index] or -1 in case no next
> >        element of this type exists.
> >
> >    prev_<indextype>(u, index) -> integer
> > ...
> 
>    Its not clear to me from the description whether the term "object index"
> is used for a code unit index or an <indextype> index. Code unit index seems
> to make the most sense but this should be explicit.

Good point.

The "Unicode object index" refers to the index you use for slicing
or indexing Unicode objects, i.e. like in "u[10]" or "u[12:15]".
As such it refers to the Unicode code unit as implemented by the
Unicode implementation (and is application specific).

I'll add a note to the PEP.

Thanks,
-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/




More information about the Python-list mailing list