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 adelfino
Recipients adelfino
Date 2018-12-03.22:43:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543877004.47.0.788709270274.issue35396@psf.upfronthosting.co.za>
In-reply-to
Content
Both fnmatch.fnmatchase and fnmatch.filter (in Unix) do not support path-like objects.

This is inconvenient, for example, when taking advantage of os.scandir and working with os.DirEntry objets.

Also, fnmatch.filter in Windows does support path-like objects, since it uses os.path.normcase (which works with path-like objects), so the change for Unix would add consistency.

I propose for both functions to accept path-like objects, and in the case of fnmatch.filter, to return the path-like object if it matches the pattern (as it does now for Windows).
History
Date User Action Args
2018-12-03 22:43:24adelfinosetrecipients: + adelfino
2018-12-03 22:43:24adelfinosetmessageid: <1543877004.47.0.788709270274.issue35396@psf.upfronthosting.co.za>
2018-12-03 22:43:24adelfinolinkissue35396 messages
2018-12-03 22:43:24adelfinocreate