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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28070>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to