This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, martin.panter, r.david.murray, serhiy.storchaka, veky
Date 2016-08-15.08:50:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471251057.66.0.907767634977.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
You still can use identity testing for named instances of IntFlags. But since the purpose of IntFlags is replacing int flags, tested values can be int (e.g. when read from files as ints). For unknown values you should use either equality testing or wrap them in IntFlags.

In your example MyFlags.FIRST & MyFlags.SECOND is MyFlags.NONE. If MyFlags.NONE not exists, the result is MyFlags(0). You can apply the patch and experiment with it.
History
Date User Action Args
2016-08-15 08:50:58serhiy.storchakasetrecipients: + serhiy.storchaka, barry, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, martin.panter, veky
2016-08-15 08:50:57serhiy.storchakasetmessageid: <1471251057.66.0.907767634977.issue23591@psf.upfronthosting.co.za>
2016-08-15 08:50:57serhiy.storchakalinkissue23591 messages
2016-08-15 08:50:57serhiy.storchakacreate