Message303692
On Oct 4, 2017, at 02:29, INADA Naoki <report@bugs.python.org> wrote:
>
> INADA Naoki <songofacandy@gmail.com> added the comment:
>
>> Yet one way -- make re.ASCII a local flag. Than we could just change the idpattern attribute to r'(?a:[_a-z][_a-z0-9]*)', without touching the flags attribute.
>
> https://docs.python.org/3.6/library/re.html#regular-expression-syntax says
> `(?imsx-imsx:...)`
>
> Anyway, Template.idpattern is documented public API too.
Too bad, because I like that approach. How hard would it be to add support for ‘a’ as a local flag? (I’m kind of surprised that it isn’t already supported - it seems like it would be useful.)
I would like this better than hacking Template.flags after the fact. It seems like the right way to align the code with the documentation (i.e. fix a bug). |
|
Date |
User |
Action |
Args |
2017-10-04 13:57:11 | barry | set | recipients:
+ barry, rhettinger, ezio.melotti, mrabarnett, methane, serhiy.storchaka |
2017-10-04 13:57:11 | barry | link | issue31672 messages |
2017-10-04 13:57:11 | barry | create | |
|