Vedran Čačić added the comment: Ok, I believe you that you have the interface for IntFlags right (I always did, and I apologize if I didn't make it clear from the start). All my questions pertain to Flags.
You said what to me seem like two contradictory things: > Not having 2 named has different consequences for Flag vs IntFlag (although > *neither is an error*): Flag: no combination of flags will ever have the 2 > bit set > if MyFlags is a Flag then MyFlags(impossible_combination) *will raise an > exception.* Are you saying that after I write class MyFlags(Flags): b001 = 1 b011 = 3 b100 = 4 b110 = 6 this is _not_ an error, but if after that I call print(MyFlags(7)) it _is_ an error? It doesn't seem so bad now I think about it, but I'd like the error to be reported before ("3 has bit of value 2 set, but that bit is not a member" or something like that). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23591> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com