Message273958
| Author |
ethan.furman |
| Recipients |
barry, eli.bendersky, ethan.furman, ezio.melotti, martin.panter, r.david.murray, rhettinger, serhiy.storchaka, veky, vstinner |
| Date |
2016年08月30日.19:42:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1472586126.25.0.371670467762.issue23591@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Since we're using re as the sample, here's where re.I is defined:
Lib/re.py:
---------
I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE # ignore case
As already mentioned, re.I results in 2, and a re.compile object is not usable as a re flag.
> Also, I suppose that means you've given up on the autocreation
We decided auto-created values were too magical for the stdlib (see issue26988). They will exist in my aenum package, though.
> (since the values _are_ semantical here),
The values have meaning because the underlying library gave them meaning; so assuming a type of Flags are used, they will be IntFlags.
> and I suppose you'll require all the declared values to be powers of 2.
Nope. You are welcome to give more meaningful names to different combinations of powers of two.
> With those conditions, I think this is a good enhancement of Python.
Hopefully you still think so. ;) |
|