summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-01-13 00:25:03 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-01-13 00:25:03 (GMT)
commitd0ff51c43f7d851f2e3beb230f346c1739152ab0 (patch)
tree768a4a27923c657157a0b4615e2eaab62d460cb8
parent5ff4f279e6342bf142de22c91662b8eb70ce722a (diff)
downloadcpython-d0ff51c43f7d851f2e3beb230f346c1739152ab0.zip
cpython-d0ff51c43f7d851f2e3beb230f346c1739152ab0.tar.gz
cpython-d0ff51c43f7d851f2e3beb230f346c1739152ab0.tar.bz2
#7685: typo
-rw-r--r--Doc/library/re.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index c099fcd..9c3a52d 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -829,16 +829,16 @@ support the following methods and attributes:
A moderately complicated example:
- >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcom Reynolds")
+ >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcolm Reynolds")
>>> m.group('first_name')
- 'Malcom'
+ 'Malcolm'
>>> m.group('last_name')
'Reynolds'
Named groups can also be referred to by their index:
>>> m.group(1)
- 'Malcom'
+ 'Malcolm'
>>> m.group(2)
'Reynolds'
@@ -881,9 +881,9 @@ support the following methods and attributes:
the subgroup name. The *default* argument is used for groups that did not
participate in the match; it defaults to ``None``. For example:
- >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcom Reynolds")
+ >>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Malcolm Reynolds")
>>> m.groupdict()
- {'first_name': 'Malcom', 'last_name': 'Reynolds'}
+ {'first_name': 'Malcolm', 'last_name': 'Reynolds'}
.. method:: MatchObject.start([group])