[Python-checkins] cpython (3.4): #24108: Update fnmatch.translate example to show correct output.
r.david.murray
python-checkins at python.org
Sat May 2 21:09:46 CEST 2015
https://hg.python.org/cpython/rev/c5c65ef84a77
changeset: 95848:c5c65ef84a77
branch: 3.4
parent: 95845:3cdeafd18e61
user: R David Murray <rdmurray at bitdance.com>
date: Sat May 02 15:08:22 2015 -0400
summary:
#24108: Update fnmatch.translate example to show correct output.
Patch by Merlijn van Deen.
files:
Doc/library/fnmatch.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -83,7 +83,7 @@
>>>
>>> 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'>
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list