Should this be considered a bug in the Enum implementation? >>> class Foo(enum.Enum): ... A = True ... B = 1 ... C = 0 ... D = False ... >>> Foo.A <Foo.A: True> >>> Foo(True) <Foo.A: True> >>> Foo(1) <Foo.A: True>
Seems to me like it should store and compare both type and value. Paul
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/5IJPHFRLPZE5CGYZH6IXCDH2V4ODXMTB/ Code of Conduct: http://python.org/psf/codeofconduct/