@classmethod
  def to_dict(cls):
    return dict((item.name, item.number) for item in iter(cls))
Make dictionary version of enumerated class.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/messages.py/Enum.to_dict