This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, steven.daprano, wolma
Date 2017-05-21.20:39:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495399162.18.0.337896136886.issue30413@psf.upfronthosting.co.za>
In-reply-to
Content
> 1) what do you think about "os.path is posixpath" vs just checking os.name == 'posix' as I suggested earlier?

Currently os.path is posixpath if and only if os.name == 'posix'. But this can be changed in future. I think it is safer to the current check. The posixpath module doesn't contain classes, enums or namedtuples, it's import is fast.

And it would be safer to keep the check in the function rather than move it at module level.

> What do you think of a keyword argument like 'case' to both filter and filterfalse that, when True, would make these functions behave equivalently to
> [n for n in names if fnmatchcase(n, pattern)]

This is a different issue. fnmatch.filter() was added for speeding up glob.glob() (see issue409973). I don't know whether there is a good use case for filtercase().

> isn't normcase in both posixpath and ntpath doing isinstance(str, bytes) checks that are redundant with os.fspath?

Good catch! It seems to me that they are redundant. Please open a new issue for this.
History
Date User Action Args
2017-05-21 20:39:22serhiy.storchakasetrecipients: + serhiy.storchaka, steven.daprano, wolma
2017-05-21 20:39:22serhiy.storchakasetmessageid: <1495399162.18.0.337896136886.issue30413@psf.upfronthosting.co.za>
2017-05-21 20:39:22serhiy.storchakalinkissue30413 messages
2017-05-21 20:39:21serhiy.storchakacreate