Author peter.otten
Recipients ezio.melotti, mgdelmonte, mrabarnett, peter.otten, serhiy.storchaka
Date 2014-10-29.15:49:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is not a bug; the signature of re.sub() is

sub(pattern, repl, string, count=0, flags=0)

and the fourth argument thus the 'count' delimiting the number of substitutions that you accidentally specify as

>>> import re
>>> re.S

I recommend that you use a keyword arg to fix your code:

>>> re.sub('x', 'a', "x"*20, flags=re.S)
Date User Action Args
2014-10-29 15:49:42peter.ottensetrecipients: + peter.otten, ezio.melotti, mrabarnett, serhiy.storchaka, mgdelmonte
2014-10-29 15:49:42peter.ottensetmessageid: <>
2014-10-29 15:49:42peter.ottenlinkissue22760 messages
2014-10-29 15:49:42peter.ottencreate