summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Summerfield <list@qtrac.plus.com>2007-10-03 08:53:21 (GMT)
committerMark Summerfield <list@qtrac.plus.com>2007-10-03 08:53:21 (GMT)
commitd92e871ad8b71de1a276f94d14b797e2e049ced8 (patch)
tree110cc74ed33094a87315350906cd1711e3c1ff09
parentbe6c7ba72ad2bc3087a7df20871387b11756e140 (diff)
downloadcpython-d92e871ad8b71de1a276f94d14b797e2e049ced8.zip
cpython-d92e871ad8b71de1a276f94d14b797e2e049ced8.tar.gz
cpython-d92e871ad8b71de1a276f94d14b797e2e049ced8.tar.bz2
Added note in footnote about string comparisons about
unicodedata.normalize().
-rw-r--r--Doc/reference/expressions.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 4e95ec3..488f090 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -1330,9 +1330,10 @@ groups from right to left).
.. [#] While comparisons between unicode strings make sense at the byte
level, they may be counter-intuitive to users. For example, the
- strings ``u"\u00C7"`` and ``u"\u0327\u0043"`` compare differently,
+ strings ``u"\u00C7"`` and ``u"\u0043\u0327"`` compare differently,
even though they both represent the same unicode character (LATIN
- CAPTITAL LETTER C WITH CEDILLA).
+ CAPTITAL LETTER C WITH CEDILLA). To compare strings in a human
+ recognizable way, compare using :func:`unicodedata.normalize`.
.. [#] The implementation computes this efficiently, without constructing lists or
sorting.