[Python-ideas] Make fnmatch.filter accept a tuple of patterns
Andre Delfino
adelfino at gmail.com
Tue Oct 30 06:43:27 EDT 2018
Frequently, while globbing, one needs to work with multiple extensions. I’d
like to propose for fnmatch.filter to handle a tuple of patterns (while
preserving the single str argument functionality, alas str.endswith), as a
first step for glob.i?glob to accept multiple patterns as well.
Here is the implementation I came up with:
https://github.com/python/cpython/compare/master...andresdelfino:fnmatch-multiple-patterns?expand=1
If this is deemed reasonable, I’ll write tests and documentation updates.
Any opinion?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20181030/88a9cd80/attachment.html>
More information about the Python-ideas
mailing list