[issue31672] string.Template should use re.ASCII flag
Barry A. Warsaw
report at bugs.python.org
Tue Oct 10 11:25:28 EDT 2017
Barry A. Warsaw <barry at python.org> added the comment:
On Oct 6, 2017, at 15:04, Serhiy Storchaka <report at bugs.python.org> wrote:
> Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
>
> Another solution (works in 3.6 too): set idpattern to r'(?-i:[_a-zA-Z][_a-zA-Z0-9]*)'.
>
> This looks pretty weird, setting the re.IGNORECASE flag and then unsetting it. But it works, and don't break the user code that changes idpattern without changing flags.
Oh, I think I like that :)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31672>
_______________________________________
More information about the Python-bugs-list
mailing list