diff -r 40a1652349e9 Doc/library/fnmatch.rst --- a/Doc/library/fnmatch.rst Sun Oct 14 22:16:27 2012 +0200 +++ b/Doc/library/fnmatch.rst Mon Oct 15 17:33:27 2012 +0300 @@ -31,6 +31,10 @@ .. index:: module: glob +One can remove the special meaning of ``'?'``, ``'*'`` and ``'['`` +by wrapping them between square brackets. Thus, ``'[?]'`` matches +the literal character ``'?'``. + Note that the filename separator (``'/'`` on Unix) is *not* special to this module. See module :mod:`glob` for pathname expansion (:mod:`glob` uses :func:`fnmatch` to match pathname segments). Similarly, filenames starting with @@ -74,8 +78,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 -r 40a1652349e9 Doc/library/glob.rst --- a/Doc/library/glob.rst Sun Oct 14 22:16:27 2012 +0200 +++ b/Doc/library/glob.rst Mon Oct 15 17:33:27 2012 +0300 @@ -19,6 +19,10 @@ subshell. (For tilde and shell variable expansion, use :func:`os.path.expanduser` and :func:`os.path.expandvars`.) +One can remove the special meaning of ``'?'``, ``'*'`` and ``'['`` +by wrapping them between square brackets. Thus, ``'[?]'`` matches +the literal character ``'?'``. + .. function:: glob(pathname)