Wolfgang Maier added the comment:

Yet another thing I just realized (sorry for being so annoying):

With os.normcase calling os.fspath in 3.6+ it is not really a NOP anymore even 
on posix. As a consequence, you can now do some weird things with fnmatch: in 
all cases, and only in these, where the module *does* call normcase you can 
pass in Path-like objects as the names.
This works with fnmatch.fnmatch on all platforms, never for fnmatchcase, and 
platform-dependently (on Windows, but not on posix platforms) for 
filter/filterfalse.
It's mostly that last case that worries me because it makes it easy to 
accidentally write code that is not platform-independent.

Also note that you can also pass a Path-like object as pat everywhere except in 
fnmatchcase.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30413>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to