Message231712
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. |
|
Date |
User |
Action |
Args |
2014-11-26 14:34:48 | mstol | set | recipients:
+ mstol, ezio.melotti, mrabarnett |
2014-11-26 14:34:48 | mstol | set | messageid: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> |
2014-11-26 14:34:48 | mstol | link | issue22949 messages |
2014-11-26 14:34:48 | mstol | create | |
|