Vedran Čačić added the comment: The weirdest thing is that it already works pretty well in output of re.compile.
>>> re.compile('', re.I | re.M) re.compile('', re.IGNORECASE|re.MULTILINE) >>> _.flags # re.UNICODE == 32 added automatically 42 So the only thing we should enhance is the output of .flags, and it seems that all the necessary code is already in the source code of __repr__ of SRE_Pattern objects. Also, I suppose that means you've given up on the autocreation (since the values _are_ semantical here), and I suppose you'll require all the declared values to be powers of 2. With those conditions, I think this is a good enhancement of Python. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23591> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com