cpython: 0b5ce36a7a24 (original) (raw)
Mercurial > cpython
changeset 74515:0b5ce36a7a24
improve casefold/lower/upper docs
Benjamin Peterson benjamin@python.org | |
---|---|
date | Wed, 18 Jan 2012 23:09:32 -0500 |
parents | 83e8c3a6a81c |
children | c535fcd2f0d4 |
files | Doc/library/stdtypes.rst |
diffstat | 1 files changed, 18 insertions(+), 2 deletions(-)[+] [-] Doc/library/stdtypes.rst 20 |
line wrap: on
line diff
--- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1005,7 +1005,16 @@ functions based on regular expressions. .. method:: str.casefold() Return a casefolded copy of the string. Casefolded strings may be used for
- caseless matching. +
- Casefolding is similar to lowercasing but more aggressive because it is
- intended to remove all case distinctions in a string. For example, the German
- lowercase letter
'ß'
is equivalent to"ss"
. Since it is already - lowercase, :meth:
lower
would do nothing to'ß'
; :meth:casefold
- converts it to
"ss"
. + - The casefolding algorithm is described in section 3.13 of the Unicode
- Standard. .. versionadded:: 3.3
@@ -1217,6 +1226,9 @@ functions based on regular expressions. Return a copy of the string with all the cased characters [4]_ converted to lowercase.
.. method:: str.lstrip([chars])
@@ -1420,7 +1432,11 @@ functions based on regular expressions.
Return a copy of the string with all the cased characters [4]_ converted to
uppercase. Note that str.upper().isupper()
might be False
if s
contains uncased characters or if the Unicode category of the resulting