[issue21464] fnmatch module uses regular expression with undefined result to perform matching
akira added the comment: I don't see (?x) flag and it is not introduced by `res` regular expression that is constructed within translate() function in Lib/fnmatch.py import fnmatch fnmatch.translate('a b') 'a\\ b\\Z(?ms)' -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21464 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21464] fnmatch module uses regular expression with undefined result to perform matching
Paul Sokolovsky added the comment: I see, so it's my misreading of the re module docs. I kinda thought that x in (?x) means any single-character flag of set (?aiLmsux). I was wrong, it is the specific literal flag. Also, rereading it again, the doc says the letters set the corresponding flags: [list of flags], for the entire regular expression. So, my report is invalid. Just to give some context, I hit this when porting fnmatch.py to MicroPython (http://micropython.org/), which doesn't use native CPython SRE, but instead system PCRE. Well, it would be nice if stdlib maintained kind of compatibility with original PCRE semantics, but that's kinda wishful thinking, we'll work it around on our side. Closing this. -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21464 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21464] fnmatch module uses regular expression with undefined result to perform matching
Changes by Paul Sokolovsky pfal...@users.sourceforge.net: -- title: fnmatch module uses undefined regular expression to perform matching - fnmatch module uses regular expression with undefined result to perform matching ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21464 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com