This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wolma
Recipients serhiy.storchaka, steven.daprano, wolma
Date 2017-05-20.17:08:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
seems I had the same thoughts as you, Steven. I had started working on a patch independently yesterday, but after making my changes to fnmatch itself, I found I had too many other things to do to address unittests and doc changes to turn this into a real patch - so thank you for spending time on all of this.
I just downloaded your patch and merged it with mine because I think my version of may be simpler and slightly faster (though like you I didn't run performance tests). Feel free to do whatever you like with this alternate version - it's not that there is much new in it to take credit for :)

Another thing I noted: fnmatch takes a rather unusual approach to determine whether normcase is NOP or not. It imports posixpath only to see if it is the same as os.path. That looks pretty weird and wasteful to me (especially if you are running this on Windows and are effectively importing posixpath just for fun then). I think it would be better to just check instead (like pathlib does for example). I moved the corresponding check to the top of the module to make this easier to address, should that be of interest. I'm also using the result of the check in fnmatch.fnmatch because I don't see any reason why you wouldn't want to benefit from it there as well.
Date User Action Args
2017-05-20 17:08:40wolmasetrecipients: + wolma, steven.daprano, serhiy.storchaka
2017-05-20 17:08:40wolmasetmessageid: <>
2017-05-20 17:08:40wolmalinkissue30413 messages
2017-05-20 17:08:39wolmacreate