Thank you this answers my question. I wanted to make sure it was actually
designed this way.
Massimo
From: Tim Chase [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2007 1:38 PM
To: DiPierro, Massimo
Cc: python-list@python.org; Berthiaume, Andre
Subject: Re
d be.
Massimo
From: Tim Chase [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2007 1:20 PM
To: DiPierro, Massimo
Cc: python-list@python.org; Berthiaume, Andre
Subject: Re: re.sub
> Even stranger
>
> >>> re.sub('a', '\\n',
It is the fisrt line that is wrong, the second follows from the first, I agree.
From: Tim Chase [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2007 1:20 PM
To: DiPierro, Massimo
Cc: python-list@python.org; Berthiaume, Andre
Subject: Re: re.sub
> E
That is not the problem. The problem is that
re.sub('a','\\n','bab')
cannot be the same as
re.sub('a','\n','bab')
This is evaluating the string to be substituted before the substitution.
Massimo
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ch