[Python-checkins] cpython (merge 3.3 -> default): #16420: merge with 3.3.

ezio.melotti python-checkins at python.org
Sat Nov 17 16:39:28 CET 2012


http://hg.python.org/cpython/rev/ff6d3fd9d08f
changeset: 80472:ff6d3fd9d08f
parent: 80468:ba1d7447bd1b
parent: 80471:2208061d863c
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Sat Nov 17 17:39:11 2012 +0200
summary:
 #16420: merge with 3.3.
files:
 Doc/library/fnmatch.rst | 5 +++--
 Doc/library/glob.rst | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -29,6 +29,9 @@
 | ``[!seq]`` | matches any character not in *seq* |
 +------------+------------------------------------+
 
+For a literal match, wrap the meta-characters in brackets.
+For example, ``'[?]'`` matches the character ``'?'``.
+
 .. index:: module: glob
 
 Note that the filename separator (``'/'`` on Unix) is *not* special to this
@@ -74,8 +77,6 @@
 
 Return the shell-style *pattern* converted to a regular expression.
 
- Be aware there is no way to quote meta-characters.
-
 Example:
 
 >>> import fnmatch, re
diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst
--- a/Doc/library/glob.rst
+++ b/Doc/library/glob.rst
@@ -19,6 +19,9 @@
 subshell. (For tilde and shell variable expansion, use
 :func:`os.path.expanduser` and :func:`os.path.expandvars`.)
 
+For a literal match, wrap the meta-characters in brackets.
+For example, ``'[?]'`` matches the character ``'?'``.
+
 
 .. function:: glob(pathname)
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /