Matthew Barnett added the comment:

The 4th parameter is the count, not the flags:

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

>>> re.sub(r'X.', '+', '-X\n-', flags=re.DOTALL)
'-+-'

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30927>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to