Ronald Pandolfi added the comment:
Ok, yeah that works. I would have thought that __members__ could be able to
differentiate between bound methods and external functions, but that's probably
asking too much.
Fair enough! This works so I'm happy. Closing, "not a bug"...
--
resolution
Alex Waygood added the comment:
It would be difficult to define methods in Enum classes if functions in the
class namespace were automatically converted into members. You can get around
this by wrapping your functions in `functools.partial` objects; see
https://stackoverflow.com/questions/40
New submission from Ronald Pandolfi :
Enum members assigned values that are functions don't remember those members.
For example:
def my_func():
...
class Test(enum.Enum):
a=1
b=my_func
Test.__members__
Out[7]: mappingproxy({'a': })
Test.b
Out[8]:
Even though b doesn't show i