R. David Murray <rdmur...@bitdance.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9584>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to