Hey All,

I know this ship has already sailed with PEP 435, but I've been working on a prototype implementation of enums using MacroPy macros.

The goal was to have enums whose methods provide most of the nice capabilities of int enums (auto-generated indexes, fast comparison, incrementing, index-arithmetic, find-by-index) and string enums (nice __repr__, find-by-name) but has the ability to smoothly scale to full-fledged objects with methods *and* fields, all this is an extremely concise way.

The gimmick here is that it uses macros to provide a concise syntax to allow you to construct each enum instance with whatever constructor parameters you wish, java-enum-style (here). This allows a degree of enums-as-objects which i haven't seen in any other library (most don't allow custom fields).

Probably not standard-library worthy, but I thought it was pretty cool.

-Haoyi