INADA Naoki <songofaca...@gmail.com> added the comment: > 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. ---------- stage: patch review -> _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31672> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com