Serhiy Storchaka added the comment:
This isn't a bug, this is a limitation of the implementation. Regular
expression parser is recursive and Python has a limit for recursion depth. You
can increase this limit if needed.
>>> import sys, re
>>> sys.setrecursionlimit(2000)
>>> re.compile('(' * 500)
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 437, in _parse_sub
itemsappend(_parse(source, state))
File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 778, in _parse
p = _parse_sub(source, state)
File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 437, in _parse_sub
itemsappend(_parse(source, state))
...
File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 778, in _parse
p = _parse_sub(source, state)
File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 437, in _parse_sub
itemsappend(_parse(source, state))
File "/home/serhiy/py/cpython/Lib/sre_parse.py", line 781, in _parse
source.tell() - start)
sre_constants.error: missing ), unterminated subpattern at position 499
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25550>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com