From 5c90436d6427981c52a181fd7c94d16fa1ce02cb Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Thu, 8 Nov 2012 17:26:53 +0200 Subject: [PATCH] Issue #16439: Fix markup in example for stdtypes. Thanks to Yongzhi Pan. --- Doc/library/stdtypes.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 6e6e8ce51a2..1d7467d2b5a 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."