python enum 判断key 或者value是否存在
https://www.cnblogs.com/ibingshan/p/10303794.html
from enum import Enum
class testEnum(int,Enum):
key1 = 0
key2 = 1
"key1" in testEnum.__members__
0 in testEnum._value2member_map_
https://www.cnblogs.com/ibingshan/p/10303794.html
from enum import Enum
class testEnum(int,Enum):
key1 = 0
key2 = 1
"key1" in testEnum.__members__
0 in testEnum._value2member_map_
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。