On 4/23/2013 10:53 AM, R. David Murray wrote: > Ah. I'd be looking for a bug every time I saw isinstance(value, > myEnumClass). A better class name for values and an API for > getting that class from the EnumClass would be nice, though. > (So that you could write "isinstance(value, MyEnumClass.ValueClass)", > say.)
Reading what you have wrote, it seems that the issue is whether you consider an instance of Enum a "thing" or a "class of things". If you think of it as a "thing", then "C" is a object that has attributes for other "things" that are not like "C". However, if you think of "C" as a "class of things", then "C" having attributes that are instances of it's type is completely natural. Fundamentally, the question is whether an instance of Enum is a new type or an instance. And for me, it's a new type and I expect enum values to be instance of that type. -Scott -- Scott Dial sc...@scottdial.com _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com