homepage

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 ezio.melotti
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日.14:16:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350310574.52.0.388722306768.issue8402@psf.upfronthosting.co.za>
In-reply-to
Content
I think the escaping workaround should be documented in the glob and/or fnmatch docs. This way users can simply do:
import glob
glob.glob("c:\abc\afolderwith[[]test]\*")
rather than
import glob
import fnmatch
glob.glob(fnmatch.escape("c:\abc\afolderwith[test]\") + "*")
The function might still be useful with patterns constructed programmatically, but I'm not sure how common the problem really is.
History
Date User Action Args
2012年10月15日 14:16:14ezio.melottisetrecipients: + ezio.melotti, terry.reedy, eric.smith, kveretennicov, eric.araujo, l0nwlf, george.hu, docs@python, maker, Aquinas, Tilka, serhiy.storchaka, a1abhishek
2012年10月15日 14:16:14ezio.melottisetmessageid: <1350310574.52.0.388722306768.issue8402@psf.upfronthosting.co.za>
2012年10月15日 14:16:14ezio.melottilinkissue8402 messages
2012年10月15日 14:16:14ezio.melotticreate

AltStyle によって変換されたページ (->オリジナル) /