File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ def capwords(s, sep=None):
5050
5151####################################################################
5252_sentinel_dict = {}
53- _sentinel_flags = object ()
5453
5554
5655class _TemplatePattern :
@@ -71,7 +70,7 @@ class Template:
7170 # See https://bugs.python.org/issue31672
7271 idpattern = r'(?a:[_a-z][_a-z0-9]*)'
7372 braceidpattern = None
74- flags = _sentinel_flags # default: re.IGNORECASE
73+ flags = None # default: re.IGNORECASE
7574
7675 pattern = _TemplatePattern () # use a descriptor to compile the pattern
7776
@@ -99,7 +98,7 @@ def _compile_pattern(cls):
9998 (?P<invalid>) # Other ill-formed delimiter exprs
10099 )
101100 """
102- if cls .flags is _sentinel_flags :
101+ if cls .flags is None :
103102 cls .flags = re .IGNORECASE
104103 pat = cls .pattern = re .compile (pattern , cls .flags | re .VERBOSE )
105104 return pat
You can’t perform that action at this time.
0 commit comments