enum
enum — Support for enumerations
New in version 3.4.
Source code: Lib/enum.py
An enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by identity, and the enumeration itself can be iterated over.
1. Module Contents
This module defines two enumeration classes that can be used to define unique sets of names and values: Enum
and IntEnum
. It also defines one decorator, 登录查看完整内容