Ezio Melotti <ezio.melo...@gmail.com> added the comment: Changing the name of the flag is fine with me.
Having a warning for unescaped brackets that trigger set operations might also be a solution (once escaped they will still work on the old re). Maybe the same could also be done for scoped flags. FWIW I tried to come up with a simpler regex that makes some sense and triggers unwanted set operations and I didn't come up with anything except: >>> regex.findall('[[(]foo[)]]', '[[foo] (foo)]') ['f', 'o', 'o', '(', 'f', 'o', 'o', ')'] >>> re.findall('[[(]foo[)]]', '[[foo] (foo)]') ['(foo)]'] (but this doesn't make too much sense). Complex regex will still break though, so the issue needs to be addressed somehow. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2636> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com