#16420: document a way to escape metacharacters in glob/fnmatch.
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
index 4911980..b14c551 100644
--- 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
@@ -76,8 +79,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
index 68cc9f0..b881a30 100644
--- 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)