(cdescriptor, message_type)
return property(Getter)
Returns a Python property the given composite field.
Returns a Python property the given composite field.
Returns a Python property the given composite field .
def CompositeProperty(cdescriptor, message_type):
  """Returns a Python property the given composite field."""

  def Getter(self):
    sub_message = self._composite_fields.get(cdescriptor.name, None)
    if sub_message is None:
      cmessage = self._cmsg.NewSubMessage(cdescriptor)
      sub_message = message_type._concrete_class(__cmessage=cmessage)
      self._composite_fields[cdescriptor.name] = sub_message
    return sub_message

  return property(Getter)
def CompositeProperty ( cdescriptor , message_type ) : def Getter ( self ) : sub_message = self . _composite_fields . get ( cdescriptor . name , None ) if sub_message is None : cmessage = self . _cmsg . NewSubMessage ( cdescriptor ) sub_message = message_type . _concrete_class ( __cmessage = cmessage ) self . _composite_fields [ cdescriptor . name ] = sub_message return sub_message return property ( Getter )