[Python-bugs-list] [ python-Bugs-604803 ] pre bug

noreply@sourceforge.net noreply@sourceforge.net
Wed, 04 Sep 2002 16:20:49 -0700


Bugs item #604803, was opened at 2002-09-05 00:20
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=604803&group_id=5470

Category: Regular Expressions
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Han-Wen Nienhuys (hanwen)
Assigned to: Fredrik Lundh (effbot)
Summary: pre bug

Initial Comment:

Hi there, 

I have an annoying bug with python 2.2 -- a workaround
is also appreciated. 

Thanks.


blauw:~/usr/src/lilypond$ cat q.py

import pre

print pre.sub ('(@)', r'@\1', r"\key c \minor r8 c16 b
c8 g as c16 b c8 d | g,4 ")

blauw:~/usr/src/lilypond$ python2 q.py
Traceback (most recent call last):
  File "q.py", line 4, in ?
    print pre.sub ('(@)', r'@\1', r"\key c \minor r8
c16 b c8 g as c16 b c8 d | g,4 ")
  File "/usr/lib/python2.2/pre.py", line 179, in sub
    return pattern.sub(repl, string, count)
  File "/usr/lib/python2.2/pre.py", line 344, in sub
    return self.subn(repl, string, count)[0]
  File "/usr/lib/python2.2/pre.py", line 366, in subn
    repl = pcre_expand(_Dummy, repl)
TypeError: 'NoneType' object is not callable
blauw:~/usr/src/lilypond$ rpm -q python2
python2-2.2-16


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=604803&group_id=5470