homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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. ;)
History
Date User Action Args
2016年08月30日 19:42:06ethan.furmansetrecipients: + ethan.furman, barry, rhettinger, vstinner, ezio.melotti, r.david.murray, eli.bendersky, martin.panter, serhiy.storchaka, veky
2016年08月30日 19:42:06ethan.furmansetmessageid: <1472586126.25.0.371670467762.issue23591@psf.upfronthosting.co.za>
2016年08月30日 19:42:06ethan.furmanlinkissue23591 messages
2016年08月30日 19:42:06ethan.furmancreate

AltStyle によって変換されたページ (->オリジナル) /