This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ocean-city
Recipients ocean-city
Date 2008-07-02.08:43:07
SpamBayes Score 0.012226997
Marked as misclassified No
Message-id <1214988192.81.0.533532272888.issue3255@psf.upfronthosting.co.za>
In-reply-to
Content
I often do same mistake again and again. Most of re module's method
takes optional argument "flags" like this.

finditer( pattern, string[, flags]) 

But, sub() takes optional argument "count" not "flags".

sub( pattern, repl, string[, count]) 

So, when I write this code, it doesn't behave like what I want.

re.sub("<[^>]+>", "", content, re.S)

I think it would be nice if the method which takes optional argument
"flags" and do same behavior with re.compile(pattern[, flags]).sub(repl,
string). Thank you.
History
Date User Action Args
2008-07-02 08:43:13ocean-citysetspambayes_score: 0.012227 -> 0.012226997
recipients: + ocean-city
2008-07-02 08:43:12ocean-citysetspambayes_score: 0.012227 -> 0.012227
messageid: <1214988192.81.0.533532272888.issue3255@psf.upfronthosting.co.za>
2008-07-02 08:43:11ocean-citylinkissue3255 messages
2008-07-02 08:43:10ocean-citycreate