Commit f6d28ceb authored by Andrew Svetlov's avatar Andrew Svetlov

Issue #16439: Fix markup in example for stdtypes.

Thanks to Yongzhi Pan.
parent f3968a90
...@@ -1253,11 +1253,11 @@ string functions based on regular expressions. ...@@ -1253,11 +1253,11 @@ string functions based on regular expressions.
>>> import re >>> import re
>>> def titlecase(s): >>> def titlecase(s):
return re.sub(r"[A-Za-z]+('[A-Za-z]+)?", ... return re.sub(r"[A-Za-z]+('[A-Za-z]+)?",
lambda mo: mo.group(0)[0].upper() + ... lambda mo: mo.group(0)[0].upper() +
mo.group(0)[1:].lower(), ... mo.group(0)[1:].lower(),
s) ... s)
...
>>> titlecase("they're bill's friends.") >>> titlecase("they're bill's friends.")
"They're Bill's Friends." "They're Bill's Friends."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment