Is it bug or feature in sre?

Discussion in 'Python' started by Roman Suzi, Jan 5, 2004.

  1. Roman Suzi

    Roman Suzi Guest

    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/", line 179, in compile
    return _compile(pattern, flags)
    File "/usr/local/lib/python2.3/", 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
    Roman Suzi, Jan 5, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.