@box(types.EnumMember)
def box_enum(typ, val, c):
 valobj = c.box(typ.dtype, val)
 cls_obj = c.pyapi.unserialize(c.pyapi.serialize_object(typ.instance_class))
 return c.pyapi.call_function_objargs(cls_obj, (valobj,))

@ box ( types . EnumMember ) def box_enum ( typ , val , c ) : valobj = c . box ( typ . dtype , val ) cls_obj = c . pyapi . unserialize ( c . pyapi . serialize_object ( typ . instance_class ) ) return c . pyapi . call_function_objargs ( cls_obj , ( valobj , ) )
fetch an enum member given its native value .