Open
Description
Using the functional API to create a enum
does not allow for specifing a shape
. RFC 3 does not mention the functional API at all, so I guess this is in some way intended, but it would be a useful feature for dynamically creating enum's anyways.
One can workaround this using
MyEnum = types.new_class('MyEnum', (Enum,), kwds={"shape": ...}, exec_body=lambda ns: ns[...] = ...)