Message294133
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. |
|
Date |
User |
Action |
Args |
2017-05-22 08:41:37 | wolma | set | recipients:
+ wolma, steven.daprano, serhiy.storchaka |
2017-05-22 08:41:37 | wolma | set | messageid: <1495442497.01.0.279987159196.issue30413@psf.upfronthosting.co.za> |
2017-05-22 08:41:36 | wolma | link | issue30413 messages |
2017-05-22 08:41:36 | wolma | create | |
|