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 serhiy.storchaka
Recipients Aquinas, Tilka, a1abhishek, docs@python, eric.araujo, eric.smith, ezio.melotti, george.hu, kveretennicov, l0nwlf, maker, serhiy.storchaka, terry.reedy
Date 2012-10-15.07:38:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350286687.3.0.795051528094.issue8402@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2012-10-15 07:38:07serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, eric.smith, kveretennicov, ezio.melotti, eric.araujo, l0nwlf, george.hu, docs@python, maker, Aquinas, Tilka, a1abhishek
2012-10-15 07:38:07serhiy.storchakasetmessageid: <1350286687.3.0.795051528094.issue8402@psf.upfronthosting.co.za>
2012-10-15 07:38:07serhiy.storchakalinkissue8402 messages
2012-10-15 07:38:07serhiy.storchakacreate