Message237269
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 |
|
Date |
User |
Action |
Args |
2015-03-05 15:31:23 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, eli.bendersky, ethan.furman |
2015-03-05 15:31:23 | serhiy.storchaka | set | messageid: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> |
2015-03-05 15:31:23 | serhiy.storchaka | link | issue23591 messages |
2015-03-05 15:31:23 | serhiy.storchaka | create | |
|