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 methane
Recipients barry, ezio.melotti, methane, mrabarnett, serhiy.storchaka
Date 2017-10-03.16:31:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507048314.33.0.213398074469.issue31672@psf.upfronthosting.co.za>
In-reply-to
Content
> This means if someone does subclass string.Template and changes the pattern to accept Unicode identifiers, then with this change they will also have to modify flags, whereas before they didn't.

Thank you for pointing it out.
I removed re.A flag after compilation.

> OTOH, making the change for performance reasons might be questionable, given that the regular expressions are compiled by the Template's metaclass, so unlikely to contribute significantly to overall performance wins.

original: import time:      2310 |       9589 | string
patched:  import time:      1420 |       8702 | string

We can save about 900 us.
History
Date User Action Args
2017-10-03 16:31:54methanesetrecipients: + methane, barry, ezio.melotti, mrabarnett, serhiy.storchaka
2017-10-03 16:31:54methanesetmessageid: <1507048314.33.0.213398074469.issue31672@psf.upfronthosting.co.za>
2017-10-03 16:31:54methanelinkissue31672 messages
2017-10-03 16:31:54methanecreate