[New-bugs-announce] [issue30722] Tools/demo/redemo.py broken

Christoph Sarnowski report at bugs.python.org
Wed Jun 21 04:57:43 EDT 2017


New submission from Christoph Sarnowski:

In Python 3.6, the flags in the "re" module became members of an enum.IntFlag, whereas before they were just ints.

This breaks the regex demo in Tools/demo/redemo.py.

To fix this, in line 86 of redemo.py, 

    getattr(re, name)

has to be replaced by 

    getattr(re, name).value

Also, the checkbox for "LOCALE" can be removed (or fixed), as re.LOCALE is invalid for str patterns.

----------
components: Regular Expressions
messages: 296530
nosy: Christoph Sarnowski2, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Tools/demo/redemo.py broken
type: behavior
versions: Python 3.6, Python 3.7

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


More information about the New-bugs-announce mailing list