New submission from Florian Bruhin: On Windows 8:
>>> fnmatch.fnmatch(r'foo\bar', 'foo/bar') True >>> fnmatch.fnmatchcase(r'foo\bar', 'foo/bar') False This is due to fnmatch calling os.path.normpath on the arguments (to get the case-sensitivity of the filesystem), which on Windows *also* happens to normalize / to \. It's probably a bad idea to change the behaviour now, but I think at least this should be clarified in the docs. ---------- components: Library (Lib) messages: 253030 nosy: The Compiler, eric.araujo, ezio.melotti, georg.brandl, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: fnmatch.fnmatch normalizes slashes/backslashes on Windows type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25409> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com