diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-11-08 15:26:53 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-11-08 15:26:53 (GMT) |
commit | 5c90436d6427981c52a181fd7c94d16fa1ce02cb (patch) | |
tree | 24ed1a8948367a7c6dacfb99efa13e3e2bec1f62 | |
parent | 0e9a0652759e59accf822f608997637e18450fd7 (diff) | |
download | cpython-5c90436d6427981c52a181fd7c94d16fa1ce02cb.zip cpython-5c90436d6427981c52a181fd7c94d16fa1ce02cb.tar.gz cpython-5c90436d6427981c52a181fd7c94d16fa1ce02cb.tar.bz2 |
Issue #16439: Fix markup in example for stdtypes.
Thanks to Yongzhi Pan.
-rw-r--r-- | Doc/library/stdtypes.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 6e6e8ce..1d7467d 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1390,11 +1390,11 @@ functions based on regular expressions. >>> import re >>> def titlecase(s): - return re.sub(r"[A-Za-z]+('[A-Za-z]+)?", - lambda mo: mo.group(0)[0].upper() + - mo.group(0)[1:].lower(), - s) - + ... return re.sub(r"[A-Za-z]+('[A-Za-z]+)?", + ... lambda mo: mo.group(0)[0].upper() + + ... mo.group(0)[1:].lower(), + ... s) + ... >>> titlecase("they're bill's friends.") "They're Bill's Friends." |