def Definition(self):
    """Return a string with the definition of this field."""
    result = self._FormatDescriptionComment()

    result += "  enum %s {\n" % self.enum_name
    for k, v in sorted(iteritems(self.reverse_enum)):
      result += "    %s = %s;\n" % (v, k)

    result += "  }\n"

    result += self._FormatField()
    return result
def Definition ( self ) : result = self . _FormatDescriptionComment ( ) result += "  enum %s {\n" % self . enum_name for k , v in sorted ( iteritems ( self . reverse_enum ) ) : result += "    %s = %s;\n" % ( v , k ) result += "  }\n" result += self . _FormatField ( ) return result
Return a string with the definition of this field.