On Wed, May 17, 2017 at 12:14:05PM -0400, Alex Walters
<[email protected]> wrote:
> 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.
Why not create a package and publish at PyPI? Then all you need is
pip install fnmatch_filter_false
in your virtual env.
Oleg.
--
Oleg Broytman http://phdru.name/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/