New submission from Jason Orendorff <[EMAIL PROTECTED]>: Below, the second regexp seems just as guilty as the first to me.
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> re.compile(r'((x|y)*)*') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/re.py", line 180, in compile return _compile(pattern, flags) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/re.py", line 233, in _compile raise error, v # invalid expression sre_constants.error: nothing to repeat >>> re.compile(r'((x|y+)*)*') <_sre.SRE_Pattern object at 0x18548> I don't know if that error is to protect the sre engine from bad patterns or just a courtesy to users. If the former, it could be a serious bug. ---------- messages: 64865 nosy: jorendorff severity: normal status: open title: re.compile(r'((x|y+)*)*') should fail versions: Python 2.6 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2537> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com