Issue #1700, reported by Nguyen Quan Son, fix by Fredruk Lundh:

Regular Expression inline flags not handled correctly for some unicode
characters.  (Forward port from 2.5.2.)
This commit is contained in:
Guido van Rossum 2008-01-03 19:12:44 +00:00
parent 1beea3be3e
commit ae04c3356e
3 changed files with 34 additions and 1 deletions

View file

@ -525,7 +525,7 @@ def compile(p, flags=0):
indexgroup[i] = k
return _sre.compile(
pattern, flags, code,
pattern, flags | p.pattern.flags, code,
p.pattern.groups-1,
groupindex, indexgroup
)