Kaydet (Commit) 5e7d51b6 authored tarafından Fredrik Lundh's avatar Fredrik Lundh

make sure to check for this limit even if we're running with -O

üst d37ddeba
......@@ -502,8 +502,10 @@ def compile(p, flags=0):
# print code
# XXX: <fl> get rid of this limitation!
assert p.pattern.groups <= 100,\
"sorry, but this version only supports 100 named groups"
if p.pattern.groups > 100:
raise AssertionError(
"sorry, but this version only supports 100 named groups"
)
# map in either direction
groupindex = p.pattern.groupdict
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment