]> granicus.if.org Git - python/commitdiff
Merged revisions 77455 via svnmerge from
authorEzio Melotti <ezio.melotti@gmail.com>
Wed, 13 Jan 2010 00:28:37 +0000 (00:28 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Wed, 13 Jan 2010 00:28:37 +0000 (00:28 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77455 | ezio.melotti | 2010-01-13 02:25:03 +0200 (Wed, 13 Jan 2010) | 1 line

  #7685: typo
........

Doc/library/re.rst

index e7ba8991981f39fee74d3f4c92f592b52ebca585..cbc61182b0a15c5c4cd8f76a06cb3c5ff433dbfe 100644 (file)
@@ -849,16 +849,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'
 
@@ -898,9 +898,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=0)