components/policy/tools/template_writers/writers/doc_writer.py
def _AddFeatures(self, parent, policy):
    '''Adds a string containing the list of supported features of a policy
    to a DOM node. The text will look like as:
      Feature_X: Yes, Feature_Y: No

    Args:
      parent: The DOM node for which the feature list will be added.
      policy: The data structure of a policy.
    '''
    features = []
    # The sorting is to make the order well-defined for testing.
    keys = sorted(policy['features'].keys())
    for key in keys:
      key_name = self._FEATURE_MAP[key]
      if policy['features'][key]:
        value_name = self.GetLocalizedMessage('supported')
      else:
        value_name = self.GetLocalizedMessage('not_supported')
      features.append('%s: %s' % (key_name, value_name))
    self.AddText(parent, ', '.join(features))
Adds a string containing the list of supported features of a policy
    to a DOM node. The text will look like as:
      Feature_X: Yes, Feature_Y: No

    Args:
      parent: The DOM node for which the feature list will be added.
      policy: The data structure of a policy.
    
Adds a string containing the list of supported features of a policy
to a DOM node. The text will look like as:
Feature_X: Yes, Feature_Y: No
Adds a string containing the list of supported features of a policy to a DOM node . The text will look like as : Feature_X : Yes Feature_Y : No
def _AddFeatures(self, parent, policy):
    features = []
    keys = sorted(policy['features'].keys())
    for key in keys:
      key_name = self._FEATURE_MAP[key]
      if policy['features'][key]:
        value_name = self.GetLocalizedMessage('supported')
      else:
        value_name = self.GetLocalizedMessage('not_supported')
      features.append('%s: %s' % (key_name, value_name))
    self.AddText(parent, ', '.join(features))
def _AddFeatures ( self , parent , policy ) : features = [ ] keys = sorted ( policy [ 'features' ] . keys ( ) ) for key in keys : key_name = self . _FEATURE_MAP [ key ] if policy [ 'features' ] [ key ] : value_name = self . GetLocalizedMessage ( 'supported' ) else : value_name = self . GetLocalizedMessage ( 'not_supported' ) features . append ( '%s: %s' % ( key_name , value_name ) ) self . AddText ( parent , ', ' . join ( features ) )
Adds a string containing the list of supported features of a policy
to a DOM node.
Adds a string containing the list of supported features of a policy to a DOM node .
'''Adds a string containing the list of supported features of a policy
    to a DOM node. The text will look like as:
      Feature_X: Yes, Feature_Y: No

    Args:
      parent: The DOM node for which the feature list will be added.
      policy: The data structure of a policy.
    ''' # The sorting is to make the order well-defined for testing.
self
parent
The DOM node for which the feature list will be added.
The DOM node for which the feature list will be added .
policy
The data structure of a policy.
The data structure of a policy .