[New-bugs-announce] [issue28070] 3.6 regression: re.compile not handling flags with X correctly

Chi Hsuan Yen report at bugs.python.org
Sat Sep 10 18:07:45 EDT 2016


New submission from Chi Hsuan Yen:

This test script:


import re

print(re.compile(r'(?ix)A').flags == re.I | re.X | re.U)
print(re.compile(r'(?ix)A').flags == re.X | re.U)
print(re.compile(r'(?im)A').flags == re.I | re.M | re.U)


gives False, True, True on default:b28b37de9470+. Python 3.5.2 gives True, False, True.

Seems re.compile does not handle flags with X correctly?

----------
components: Regular Expressions
messages: 275705
nosy: Chi Hsuan Yen, ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: 3.6 regression: re.compile not handling flags with X correctly
type: behavior
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28070>
_______________________________________


More information about the New-bugs-announce mailing list