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

noreply@sourceforge.net noreply@sourceforge.net
Mon, 09 Sep 2002 07:27:55 -0700


Bugs item #604803, was opened at 2002-09-05 01: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: Closed
>Resolution: Out of Date
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


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

>Comment By: Fredrik Lundh (effbot)
Date: 2002-09-09 16:27

Message:
Logged In: YES 
user_id=38376

this has been fixed in CVS:

http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/python/python/dist/src/Lib/pre.py.diff?
r1=1.10&r2=1.10.18.1

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

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