Message272796
I think I have written about all the options in detail in http://bugs.python.org/msg272732. If I see it right, your ".0" corresponds to what I called ".__NONE__". It is a "right way" to do it, but for it to be complete, you also have to add ".__ALL__", representing -1, as its complement. If you do both of these, I'm fine with it, and we can discuss further problems... :-)
... like inverting representation. If you have non-powers of 2 named, how do you know which exact flags a value consists of?
class Weird(Flags):
AB = 3
C = 4
BC = 6
A = 1
what is Weird(7)? Weird.(AB|C) or Weird.(A|BC)? What if you don't have C (or A) as a name? Are you going to employ a minimal exact cover algorithm? :-O |
|
Date |
User |
Action |
Args |
2016-08-15 20:17:05 | veky | set | recipients:
+ veky, barry, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, martin.panter, serhiy.storchaka |
2016-08-15 20:17:05 | veky | set | messageid: <1471292225.72.0.793300144944.issue23591@psf.upfronthosting.co.za> |
2016-08-15 20:17:05 | veky | link | issue23591 messages |
2016-08-15 20:17:05 | veky | create | |
|