Make fnmatch.filter accept a tuple of patterns
30 Oct
2018
30 Oct
'18
10:43 a.m.
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-mul... If this is deemed reasonable, I’ll write tests and documentation updates. Any opinion?
1089
Age (days ago)
1967
Last active (days ago)
15 comments
9 participants
participants (9)
-
adelfino@gmail.com
-
Andre Delfino
-
Chris Angelico
-
David Mertz
-
MRAB
-
Oleg Broytman
-
Peter Otten
-
Stephen J. Turnbull
-
Steven D'Aprano