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