[Python-checkins] cpython (merge 3.6 -> default): Issue #22493: Updated an example for fnmatch.translate().

serhiy.storchaka python-checkins at python.org
Thu Oct 27 15:50:48 EDT 2016


https://hg.python.org/cpython/rev/ded9a3c3bbb6
changeset:   104757:ded9a3c3bbb6
parent:      104755:05777a9c9b6b
parent:      104756:c04a56b3a4f2
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Oct 27 22:45: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