diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-11-08 15:27:39 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-11-08 15:27:39 (GMT) |
commit | 7cac2d8368c4ecaa3d5edd58d111c71eaa704eaa (patch) | |
tree | de71bef4b677f13863c43b0b20543e0f0b22a027 | |
parent | b5570e990909f5adaa375e43f2145f15feb6bfe1 (diff) | |
parent | 5c90436d6427981c52a181fd7c94d16fa1ce02cb (diff) | |
download | cpython-7cac2d8368c4ecaa3d5edd58d111c71eaa704eaa.zip cpython-7cac2d8368c4ecaa3d5edd58d111c71eaa704eaa.tar.gz cpython-7cac2d8368c4ecaa3d5edd58d111c71eaa704eaa.tar.bz2 |
Merge 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 0366507..cd07fa7 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1832,11 +1832,11 @@ expression support in the :mod:`re` module). >>> 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." |