diff options
Diffstat (limited to 'Lib/string.py')
-rw-r--r-- | Lib/string.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/string.py b/Lib/string.py index 5089193c7d..defe894414 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -81,7 +81,7 @@ class _TemplateMetaclass(type): 'delim' : _re.escape(cls.delimiter), 'id' : cls.idpattern, } - cls.pattern = _re.compile(pattern, _re.IGNORECASE | _re.VERBOSE) + cls.pattern = _re.compile(pattern, cls.flags | _re.VERBOSE) class Template(metaclass=_TemplateMetaclass): @@ -89,6 +89,7 @@ class Template(metaclass=_TemplateMetaclass): delimiter = '$' idpattern = r'[_a-z][_a-z0-9]*' + flags = _re.IGNORECASE def __init__(self, template): self.template = template |