[Python-checkins] cpython (3.6): Issue #22493: Updated an example for fnmatch.translate().
serhiy.storchaka
python-checkins at python.org
Thu Oct 27 15:50:47 EDT 2016
https://hg.python.org/cpython/rev/c04a56b3a4f2
changeset: 104756:c04a56b3a4f2
branch: 3.6
parent: 104754:fbc4d01ae3f0
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Oct 27 22:44:03 2016 +0300
summary:
Issue #22493: Updated an example for fnmatch.translate().
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
@@ -82,7 +82,7 @@
>>>
>>> regex = fnmatch.translate('*.txt')
>>> regex
- '.*\\.txt\\Z(?ms)'
+ '(?s:.*\\.txt)\\Z'
>>> 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