pydoc > enum.IntEnum

📛 NAME

IntEnum — Enum where members are also (and must be) ints

🚀 Quick Reference

Use CaseCommandDescription
Define an integer enumclass Color(IntEnum): RED=1; GREEN=2Create enum members that are also ints
Access member nameColor.RED.nameGet the name of the member
Access member valueColor.RED.valueGet the integer value
List all memberslist(Color)Iterate over enum members
Check membership1 in ColorTest if value is a member (int compatibility)

📖 DESCRIPTION

Enum where members are also (and must be) ints. This class inherits from both builtins.int and Enum.

enum.IntEnum = class IntEnum(builtins.int, Enum)
 |  enum.IntEnum(value, names=None, *, module=None, qualname=None, type=None, start=1)

Method resolution order:

     IntEnum
     builtins.int
     Enum
     builtins.object

🧬 Data descriptors inherited from Enum

⚙️ Readonly properties inherited from EnumMeta

enum.IntEnum
📛 NAME 🚀 Quick Reference 📖 DESCRIPTION
🧬 Data descriptors inherited from Enum ⚙️ Readonly properties inherited from EnumMeta

Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-19 20:20 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format