Message273954
| Author |
veky |
| Recipients |
barry, eli.bendersky, ethan.furman, ezio.melotti, martin.panter, r.david.murray, rhettinger, serhiy.storchaka, veky, vstinner |
| 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. |
|