Author r.david.murray
Recipients bochecha, eric.araujo, eric.smith, pitrou, r.david.murray
Date 2010-08-13.13:27:28
SpamBayes Score 1.9532e-11
Marked as misclassified No
Message-id <1281706051.38.0.744205755046.issue9584@psf.upfronthosting.co.za>
In-reply-to
Content
My view is that people using fnmatch/glob are expecting to get back the same list of files that they would if they ran 'echo <globpattern>' in the shell.  The major shells (sh, bash, zsh, csh) seem to be pretty consistent in this regard (though sh does less brace expansion than the others...but is almost always actually bash these days).

If you just wanted to provide a flexible way for people to match files, then instead of fnmatch/glob, we should have a function that walks down a directory tree applying a regular expression to the filenames it encounters and returning the rooted pathnames of the matches.  That function is easy enough to write using standard library facilities.  The special magic of fnmatch/glob is that it does a not-so-easy-to-get-right transformation of *shell* globbing rules into regular expressions behind the scenes.  That is, in my view its *purpose* is to be compatible with the "normal rules" for unix shell globbing.

So currently I'm about -0.5 on this feature.
History
Date User Action Args
2010-08-13 13:27:31r.david.murraysetrecipients: + r.david.murray, pitrou, eric.smith, eric.araujo, bochecha
2010-08-13 13:27:31r.david.murraysetmessageid: <1281706051.38.0.744205755046.issue9584@psf.upfronthosting.co.za>
2010-08-13 13:27:29r.david.murraylinkissue9584 messages
2010-08-13 13:27:28r.david.murraycreate