Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b85377

Browse files
committed
Merge: #24108: Update fnmatch.translate example to show correct output.
2 parents deed215 + 4590c3d commit 3b85377

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/fnmatch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ patterns.
8383
>>>
8484
>>> regex = fnmatch.translate('*.txt')
8585
>>> regex
86-
'.*\\.txt$'
86+
'.*\\.txt\\Z(?ms)'
8787
>>> reobj = re.compile(regex)
8888
>>> reobj.match('foobar.txt')
8989
<_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>

0 commit comments

Comments
 (0)