This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, ezio.melotti, methane, mrabarnett, rhettinger, serhiy.storchaka
Date 2017-10-04.13:57:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <ECA16B1F-253E-49E6-AFBD-E12BE724037C@python.org>
In-reply-to <1507098555.81.0.213398074469.issue31672@psf.upfronthosting.co.za>
Content
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).
History
Date User Action Args
2017-10-04 13:57:11barrysetrecipients: + barry, rhettinger, ezio.melotti, mrabarnett, methane, serhiy.storchaka
2017-10-04 13:57:11barrylinkissue31672 messages
2017-10-04 13:57:11barrycreate