Serhiy Storchaka added the comment:

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.

----------
Added file: http://bugs.python.org/file44114/intflags_3.patch

_______________________________________
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