On 8/29/2010 10:22 AM, naugiedoggie wrote:
Hello,

I'm having a problem with using a function as the replacement in
re.sub().

Here is the function:

def normalize(s) :
     return
urllib.quote(string.capwords(urllib.unquote(s.group('provider'))))

To debug your problem, I would start with print(s) in the function and if still not clear, unnest the expression and print intermediate results.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to