而在Python 3.4 及以上版本中,可以使用 auto() 函数来自动计算枚举标记成员的值。 具体用法如下: from enum import Enum, auto class Color(Enum): RED = ...
確定! 回上一頁