+1 on 'complete'. If 'enum.unique()' means 'every value has at most one name', then perhaps `enum.complete()` can mean 'every value has at least one name'? Or is that not accurate?
Other suggestions: 'occupied', 'full', 'exhaustive'. Barney On Mon, 31 May 2021 at 00:02, Jeff Allen <[email protected]> wrote: > On 28/05/2021 04:24, Ethan Furman wrote: > > > The flags RED, GREEN, and BLUE are all canonical, while PURPLE and WHITE > are aliases for certain flag combinations. But what if we have something > like: > > class Color(Flag): > RED = 1 # 0001 > BLUE = 4 # 0100 > WHITE = 7 # 0111 > > ... > > So, like the enum.unique decorator that can be used when duplicate names > should be an error, I'm adding a new decorator to verify that a Flag has no > missing aliased values that can be used when the programmer thinks it's > appropriate... but I have no idea what to call it. > > Any nominations? > > The propery you are looking for IIUC is that if a bit position is 1 in any > member, then there is a member with only that bit set. I am seeing these > members as sets of elements (bit positions) and therefore you want > optionally to ensure that your enumeration has a name for every singleton > set, into which any member could be analysed. > > Words like "basis", "complete", "analytic", or "indicator" (as in > indicator function) come to mind. I find "singletonian" attractive, but > no-one will know what it means, and I just made it up. > > Jeff > _______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/7VN5Z5FSN3CH33KKQELX63L7JW6WEB2L/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/O5LBIFIBVAYDKBDKBXE5HDY4TA6SAUFO/ Code of Conduct: http://python.org/psf/codeofconduct/
