Author veky
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, haypo, martin.panter, r.david.murray, rhettinger, serhiy.storchaka, veky
Date 2016-08-30.19:21:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1472584912.33.0.331289565095.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-08-30 19:21:52vekysetrecipients: + veky, barry, rhettinger, haypo, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, martin.panter, serhiy.storchaka
2016-08-30 19:21:52vekysetmessageid: <1472584912.33.0.331289565095.issue23591@psf.upfronthosting.co.za>
2016-08-30 19:21:52vekylinkissue23591 messages
2016-08-30 19:21:52vekycreate