[issue30413] Add fnmatch.filterfalse function

2019-08-21 Thread Guido van Rossum
Guido van Rossum added the comment: Yes, I still feel like this and I find it applies here. (Note that the module already has two variants of fnmatch(), so it's nothing new in this context.) -- ___ Python tracker

[issue30413] Add fnmatch.filterfalse function

2019-08-21 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30413] Add fnmatch.filterfalse function

2019-08-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Rather than adding a new function, why not adding a parameter Guido, the reason iteratools has a separate filter() and filterfalse() tools is because of your API guidance to prefer separate functions rather than having flags in most cases. Do you stil

[issue30413] Add fnmatch.filterfalse function

2019-08-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Wed, Aug 21, 2019 at 10:51:02AM +, STINNER Victor wrote: > Rather than adding a new function, why not adding a parameter like > sort(key=func, reverse=True)? Something like fnmatch.filterfalse(pat, > invert=True)? Guido argues that as a general rule

[issue30413] Add fnmatch.filterfalse function

2019-08-21 Thread STINNER Victor
STINNER Victor added the comment: Rather than adding a new function, why not adding a parameter like sort(key=func, reverse=True)? Something like fnmatch.filterfalse(pat, invert=True)? The Unix grep command has a --invert-match option: -v, --invert-match Invert the sens

[issue30413] Add fnmatch.filterfalse function

2019-08-21 Thread Roee Nizan
Roee Nizan added the comment: Was this abandoned? Is there a reason not to accept this? -- nosy: +Roee Nizan ___ Python tracker ___ ___

[issue30413] Add fnmatch.filterfalse function

2017-05-25 Thread Brett Cannon
Brett Cannon added the comment: I don't think os.normcase() calling os.fspath() needs to be a worry. Pragmatically it's just getting a str/bytes from an object that knows how to return a str/bytes for a path. IOW it's no different than os.normcase(str(path)) and so embedding the call such that

[issue30413] Add fnmatch.filterfalse function

2017-05-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30413] Add fnmatch.filterfalse function

2017-05-22 Thread Wolfgang Maier
Wolfgang Maier added the comment: Yet another thing I just realized (sorry for being so annoying): With os.normcase calling os.fspath in 3.6+ it is not really a NOP anymore even on posix. As a consequence, you can now do some weird things with fnmatch: in all cases, and only in these, where th

[issue30413] Add fnmatch.filterfalse function

2017-05-22 Thread Wolfgang Maier
Wolfgang Maier added the comment: > Good catch! It seems to me that they are redundant. Please open a new issue > for this. done: issue 30427 -- ___ Python tracker ___

[issue30413] Add fnmatch.filterfalse function

2017-05-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > 1) what do you think about "os.path is posixpath" vs just checking os.name == > 'posix' as I suggested earlier? Currently os.path is posixpath if and only if os.name == 'posix'. But this can be changed in future. I think it is safer to the current check. T