Ethan Furman added the comment:

Serhiy's patch is only for IntFlags, and my patch hasn't yet fully incorporated 
his (many thanks for decompose!)

For IntFlags I do not expect to have very many instances alive at once, 
especially since not-bitwise operators will lose the IntFlag class and become 
plain ints.

Flags are closed.  If the zero value is not specified the repr and str are:

>>> Hah(0)
<Hah: 0>
>>> str(Hah(0))
'Hah.0'

(An RGB class might be:  <RGB.Black: 0>)

A question I have about IntFlags:

If a third-party lib specifies that certain bits are reserved and should always 
be zero (or at least not changed), do we want to add some easy support for 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

Reply via email to