[issue21464] fnmatch module uses regular expression with undefined result to perform matching

Paul Sokolovsky report at bugs.python.org
Sat May 10 20:22:09 CEST 2014


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 <report at bugs.python.org>
<http://bugs.python.org/issue21464>
_______________________________________


More information about the Python-bugs-list mailing list