更好的方法是为这样的枚举类型定义一个class类型,然后,每个常量都是class的一个唯一实例。Python提供了 Enum 类来实现这个功能: from enum import Enum Month ...
確定! 回上一頁