Commit 7b788e05 authored by Fred Drake's avatar Fred Drake

Clarify that len() of a Unicode string returns the number of storage units,

not abstract characters.
parent 24e53b6d
......@@ -568,6 +568,10 @@ def my_import(name):
\begin{funcdesc}{len}{s}
Return the length (the number of items) of an object. The argument
may be a sequence (string, tuple or list) or a mapping (dictionary).
In the case of Unicode strings, \function{len()} returns the number
of storage units, not abstract characters. In particular, when a
surrogate pair is encountered, each component of the pair is counted
as a separate character.
\end{funcdesc}
\begin{funcdesc}{list}{\optional{sequence}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment