[$] Extending Python's enums
Enumerated types or "enums" are a feature of many languages, includingPython; enums provide a convenient way to collect up a bunch of relatedsymbols that (typically) evaluate to integer values. The canonical examplewould seem to be for colors, at least for demonstration purposes, but there areothers, especially for handling "magic" constants from source likes POSIXor the host operating system. A recent thread on the python-ideas mailing list discussesdifferent ways to add a new feature to enums-seven years after they wereadded to the standard library as part ofPython 3.4.