fnmatch module
fnmatch, fnmatchcase, filter and translate are available, with CPython’s signatures and errors.
fnmatch()andfilter()are case-sensitive and never normalise separators. The sandbox’sos.pathisposixpath, whosenormcaseleaves names unchanged, sofnmatch()behaves asfnmatchcase()and'a/b'does not match'a\\b'on every host, where CPython on Windows folds case and turns/into\. For the same reason a non-string name infilter()reaches the matcher and raisesTypeError: expected string or bytes-like object, got 'int', as CPython does on POSIX; Windows CPython raisesos.fspath’sexpected str, bytes or os.PathLike object, not intfirst.- The module has no
__all__, and its functions carry no attributes, as on every built-in module (see modules.md).