Message254042
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 |
|
Date |
User |
Action |
Args |
2015-11-04 09:27:12 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, effbot, pitrou, ezio.melotti, mrabarnett, The Compiler |
2015-11-04 09:27:12 | serhiy.storchaka | set | messageid: <1446629232.01.0.273591339993.issue25550@psf.upfronthosting.co.za> |
2015-11-04 09:27:11 | serhiy.storchaka | link | issue25550 messages |
2015-11-04 09:27:11 | serhiy.storchaka | create | |
|