Jil*_*loc 39 python enums enumeration
有没有标准方法可以获得 Enumeration names by value?
一个例子:
class Example(enum.Enum):
one = 1
two = 2
ex_variable = 1
Run Code Online (Sandbox Code Playgroud)
给定ex_variable
,我可以获取Example.one.name中包含的字符串吗?
归档时间: |
|
查看次数: |
28782 次 |
最近记录: |