[issue1700] Regular Expression inline flags not handled correctly for some unicode characters

Fredrik Lundh report at bugs.python.org
Wed Jan 2 12:17:44 CET 2008


Fredrik Lundh added the comment:

Looks like the wrong execution flags are being passed to the function
that creates the actual pattern object; the SRE compiler does the right
thing, but the engine isn't running with the right flags in the last
case.  Changing the call to _sre.compile in sre_compile.py to:

    return _sre.compile(
        pattern, flags | p.pattern.flags, code,
        p.pattern.groups-1,
        groupindex, indexgroup
        )

should do the trick, I think.  (got no time to fix my broken Python SVN
setup right now, but if someone wants to verify this and add the
necessary tests to the test suite, be my guest).

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1700>
__________________________________


More information about the Python-bugs-list mailing list