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 serhiy.storchaka
Recipients barry, eli.bendersky, ethan.furman, serhiy.storchaka
Date 2015-03-05.15:31:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
Here is preliminary implementation of IntFlags (no docs). This is an int subclass purposed to represent a set of integer flags. It supports named constants (as IntEnum), supports bitwise operations (&, |, ~) and has funny str and repr. See discussion on Python-Ideas [1].

The patch includes tests and few examples of using IntFlags in the stdlib.

[1] http://comments.gmane.org/gmane.comp.python.ideas/32267
History
Date User Action Args
2015-03-05 15:31:23serhiy.storchakasetrecipients: + serhiy.storchaka, barry, eli.bendersky, ethan.furman
2015-03-05 15:31:23serhiy.storchakasetmessageid: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za>
2015-03-05 15:31:23serhiy.storchakalinkissue23591 messages
2015-03-05 15:31:23serhiy.storchakacreate