【Python】枚举定义

继承enum.Enum类即可。

语法:

class Test(enum.Enum):
    key1 = v1
posted @ 2023-12-02 21:57  NotReferenced  阅读(3)  评论(0编辑  收藏  举报