]> granicus.if.org Git - python/commitdiff
#24108: Update fnmatch.translate example to show correct output.
authorR David Murray <rdmurray@bitdance.com>
Sat, 2 May 2015 19:08:22 +0000 (15:08 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 2 May 2015 19:08:22 +0000 (15:08 -0400)
Patch by Merlijn van Deen.

Doc/library/fnmatch.rst

index ef93f05a7a5c4ddfc09696f030155ba6465dc51e..68b437f2c04148f0021ae5d4ddb03709d577fa49 100644 (file)
@@ -83,7 +83,7 @@ patterns.
       >>>
       >>> regex = fnmatch.translate('*.txt')
       >>> regex
-      '.*\\.txt$'
+      '.*\\.txt\\Z(?ms)'
       >>> reobj = re.compile(regex)
       >>> reobj.match('foobar.txt')
       <_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>