Alex Martelli <aleax at aleax.it> -> search re and put in a list??

Alex Martelli aleax at aleax.it
Mon Sep 16 16:13:44 EDT 2002


jubafre at brturbo.com wrote:
        ...
>  Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "C:\Documents and Settings\jubafre\Desktop\teste.py", line 27, in ?
>     final = [ big_re.sub(x, replacer)for x in S ]
> TypeError: expected string or buffer
> 
> what happened????

Exchange the arguments to big_re.sub -- it's

  final = [ big_re.sub(replacer, x) for x in S ]


Alex




More information about the Python-list mailing list