Serhiy Storchaka added the comment:

> The attached patch adds support for '\\' escaping to fnmatch, and 
> consequently to glob.

This is a backward incompatible change. For example glob.glob(r'C:\Program 
Files\*') will be broken.

As flacs says a way to escape metacharacters in glob/fnmatch already exists. If 
someone want to match literal name "Ajax_[version2].txt" it should use pattern 
"Ajax_[[]version2].txt". Documentation should explicitly mentions such way.

It will be good also to add new fnmatch.escape() function.

----------
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, serhiy.storchaka

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

Reply via email to