[Python-ideas] fnmatch.filter_false
Alex Walters
tritium-list at sdamon.com
Wed May 17 12:14:05 EDT 2017
More information about the Python-ideas mailing list
Wed May 17 12:14:05 EDT 2017
- Previous message (by thread): [Python-ideas] Running C extension modules using -m switch
- Next message (by thread): [Python-ideas] fnmatch.filter_false
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fnmath.filter works great. To remind people what it does, it takes an iterable of strings and a pattern and returns a list of the strings that match the pattern. And that is wonderful However, I often need to filter *out* the items that match the pattern (to ignore them). In every project that I need this I end up copying the function out of the fnmatch library and adding 'not' to the test clause. It would be wonderful if there was a filter_false version in the standard library. Or in inversion Boolean option. Or something, to stop from having to copy code every time I need to ignore files.
- Previous message (by thread): [Python-ideas] Running C extension modules using -m switch
- Next message (by thread): [Python-ideas] fnmatch.filter_false
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list