[Python-ideas] Re: Addition to fnmatch.py

2022-06-06 Thread John Carter
Thanks for all the comments. I did consider using sets but order was important and when partitioning a list of general strings, not file names, there could be identical and important strings (strings at different positions could mean different things, especially when generating test and train

[Python-ideas] Addition to fnmatch.py

2022-06-05 Thread John Carter
I’d like to propose a simple addition to the 'fnmatch' module. Specificity a function that returns a list of names that match a pattern AND a list of those that don't. In a recent project I found that I wished to split a list of files and move those that matched a pattern to one folder and tho