RE bug in Python 2.0b1

Fredrik Stenberg su96-fst at nada.kth.se
Fri Sep 15 05:46:27 EDT 2000


On Fri, 15 Sep 2000, vio wrote:

> I believe there may be a RE bug in 2.0b1. Consider the following script:
> 
> #!/usr/bin/env python
> import re
> s = "red green blue"
> m = re.compile(r'green (\w+)', re.IGNORECASE)
> t = re.subn(m, r'matchedword \1 blah', s)
> print t
> 
> 
> When I run this on 1.5.2, I get the following expected output:
> 
> ('red matchedword blue blah', 1)
> 
> 
> If I run it on 2.0b1, python basically hangs.
> 

Same problem with python1.6

/fredriks




More information about the Python-list mailing list