Ezio Melotti <ezio.melo...@gmail.com> added the comment: Since this has been reported already several times (see e.g. #11947), and it's a fairly common mistake, I think we should do something to avoid it.
A few possibilities are: 1) add a warning in the doc; 2) make count and flag keyword-only argument (raising a deprecation warning in 3.3 and actually change it later); 3) change the regex flags to some object that can be distinguished from ints and raise an error when a flag is passed to count; ---------- nosy: +ezio.melotti, mrabarnett title: re.sub problem with unicode string -> re.sub confusion between count and flags args versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11957> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com