Bug report
Bug description:
I observed different behavior for Enum __contains__ in 3.13.2 and 3.13.3 if there is _missing_ method implemented:
fromenumimportEnumclassColor(Enum):
RED=1@classmethoddef_missing_(cls, value):
returncls.RED# 3.13.2>>>"blue"inColorFalse# 3.13.3>>>"blue"inColorTrue
IMO _missing_ should only influence the __call__ method:
# both 3.13.2 and 3.13.3>>>Color("blue")
<Color.RED: 1>CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs
Bug report
Bug description:
I observed different behavior for Enum
__contains__in 3.13.2 and 3.13.3 if there is_missing_method implemented:IMO
_missing_should only influence the__call__method:CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PRs