Antoine Pitrou <pit...@free.fr> 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.

But it's not the case since we currently don't process braces anyway.

> 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).

Excluding the 95% (or so) of Windows users, I suppose.

> 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.

I've never thought that the purpose of glob or fnmatch was to reproduce
shell rules. It's simply a convenient primitive. Wildcard expansion
exists in lots of other software than Unix shells.

----------

_______________________________________
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