Message273954
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. |
|
Date |
User |
Action |
Args |
2016-08-30 19:21:52 | veky | set | recipients:
+ veky, barry, rhettinger, vstinner, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, martin.panter, serhiy.storchaka |
2016-08-30 19:21:52 | veky | set | messageid: <1472584912.33.0.331289565095.issue23591@psf.upfronthosting.co.za> |
2016-08-30 19:21:52 | veky | link | issue23591 messages |
2016-08-30 19:21:52 | veky | create | |
|