def _AddPropertiesForFields(descriptor, cls):
 for field in descriptor.fields:
  _AddPropertiesForField(field, cls)
 if descriptor.is_extendable:
  cls.Extensions = property((lambda self: _ExtensionDict(self)))

def _AddPropertiesForFields ( descriptor , cls ) : for field in descriptor . fields : _AddPropertiesForField ( field , cls ) if descriptor . is_extendable : cls . Extensions = property ( ( lambda self : _ExtensionDict ( self ) ) )
adds properties for all fields in this protocol message type .