[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread mstol
mstol added the comment: So you suggest that this output should not be used with re.search ? Why? I think it should be documented, or maybe it is? I know that this is not possible to introduce such a change to the currently used versions

[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread mstol
mstol added the comment: it can be changed easyly with changing the return statement in fnmatch.py function translate from: return res + '\Z(?ms)' to: return '^' + res + '\Z(?ms)' -- ___ Python tracker <

[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread mstol
New submission from mstol: 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 s