[Python-ideas] IntFlags

Ethan Furman ethan at stoneleaf.us
Tue Mar 3 23:29:34 CET 2015


On 03/03/2015 02:16 PM, Chris Angelico wrote:
> On Wed, Mar 4, 2015 at 9:04 AM, Cameron Simpson <cs at zip.com.au> wrote:
>> I agree. I presume IntEnum|IntEnum might return an IntFlags? Or would that
>> make for a TypeError or ValueError and one be expected to start with
>> IntFlags?
> 
> That should be a sanity error, but since an IntEnum devolves to an
> int, it just produces a nonsensical integer. It definitely shouldn't
> become an IntFlags.

Agreed.  IntEnums are just fancy ints, and will continue to behave as ints with the exception of how they are displayed.

IntFlags, should such a thing come into being, can be more proprietary with its behavior.

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150303/e72f246e/attachment.sig>


More information about the Python-ideas mailing list