[issue45657] Enum behavior when values are functions

2021-10-28 Thread Ronald Pandolfi
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,

[issue45657] Enum behavior when values are functions

2021-10-28 Thread Ronald Pandolfi
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