Is it bug or feature in sre?

R

Roman Suzi

I've accidentally tried on of my programs written for Python 1.5
and encountered this:

Python 2.3.1 (#1, Sep 25 2003, 10:15:04)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
.......
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/sre.py", line 179, in compile
return _compile(pattern, flags)
File "/usr/local/lib/python2.3/sre.py", line 229, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat

I wonder why I can't do this? I guess it's of terrible style, but
is this behaviour intentional or not?
Probably it is good idea to mention this in Python update path
documents. Otherwise some old programs will mysteriously fail.


Sincerely yours, Roman A.Suzi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top