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 mstol
Recipients ezio.melotti, mrabarnett, mstol
Date 2014-11-26.14:34:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure if this is real bug, but the documentation of fnmatch.translate states:

fnmatch.translate(pattern)

    Return the shell-style pattern converted to a regular expression.



My intuition about shell-style pattern is that for example, pattern:t3
should match only t3, and not ost3 or xxxxxt3, but what I receive from fnmatch is:
In [2]: fnmatch.translate("t3")
Out[2]: 't3\\Z(?ms)'

so using for example re.search will match not only on t3, but also on xxxt3 (in shell-like pattern is *t3). So... I  believe it should be changed or at least the documentation should be more specific about what "shell-style pattern" mean.
History
Date User Action Args
2014-11-26 14:34:48mstolsetrecipients: + mstol, ezio.melotti, mrabarnett
2014-11-26 14:34:48mstolsetmessageid: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za>
2014-11-26 14:34:48mstollinkissue22949 messages
2014-11-26 14:34:48mstolcreate