[Python-Dev] * and ? in fnmatch

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Thu, 17 Feb 2000 16:06:04 +0100


> I have recently been playing with the fnmatch module, and learned that =
*
> and ? as considered by 'fnmatch.translate()' match *all* characters,
> including slashes, colons, backslashes -- in short, whatever happens =
to
> be "special" characters for pathnames on the current platform.
>=20
> In other words, "foo?bar.py" matches both "foo_bar.py" and =
"foo/bar.py".

this is documented behaviour:

    Note that the filename separator ('/' on Unix) is not
    special to this module. See module glob for pathname
    expansion (glob uses fnmatch() to match filename=20
    segments).=20

>    def translate(pat,
>                  pathname=3D0,=20
>                  noescape=3D0,
>                  period=3D0,
>                  leading_dir=3D0,
>                  casefold=3D0)

sure looks like feature creep to me.  is anyone actually
using this module directly?

</F>