On Apr 23, 2013, at 10:24 AM, R. David Murray wrote: >> >>> isinstance(C.a, C) >> False >> >>> isinstance(C(1), C) >> False >> >> It would really be better if instances were actual instances of the >> class, IMO. > >The first False looks correct to me, I would not expect an enum value to be >an instance of the class that holds it as an attribute. Agreed, completely. >The second certainly looks odd, but what does it even mean to have an >instance of an Enum class? It only looks odd because it's using failed, duplicate, deprecated syntax. Does this look similarly odd? >>> isinstance(C[1], C) False given that ``C[1] is C.a``? -Barry
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4