Author veky
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, martin.panter, r.david.murray, serhiy.storchaka, veky
Date 2016-08-15.20:17:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471292225.72.0.793300144944.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-08-15 20:17:05vekysetrecipients: + veky, barry, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, martin.panter, serhiy.storchaka
2016-08-15 20:17:05vekysetmessageid: <1471292225.72.0.793300144944.issue23591@psf.upfronthosting.co.za>
2016-08-15 20:17:05vekylinkissue23591 messages
2016-08-15 20:17:05vekycreate