Issue #16439: Fix markup in example for stdtypes.

Thanks to Yongzhi Pan.
This commit is contained in:
Andrew Svetlov 2012-11-08 17:29:02 +02:00
parent 9b19c4bea9
commit 3eb0e1da80
1 changed files with 5 additions and 5 deletions

View File

@ -1253,11 +1253,11 @@ string 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."