Hi James, Sorry I should have read more carefully. You're absolutely right. The thrift_spec class attribute uses TType.I32, so there's no reference back to the generated enum class.
It's interesting that the client-code I've seen so far with enums essentially hard-codes the relationship between a field using enums and the enum class. This is definitely a deficiency for writing good, clean client code. Until enums from PEP435 <http://www.python.org/dev/peps/pep-0435/> (and python 3.4+) is available/practical/deployable, then I'm sure your patches will be welcome to help get around this! As a personal preference, it would be really nice if your patch could enhance thrift enums in python so that they emulate the behavior of PEP435 enums. That would reduce learning curves and simplify future development, if/when we eventually add targetting of python3.4+ to the thrift compiler. -Will
