parameters: (self, key, points, unit='',
               summaryFns=[AVG, MAX])
docstring: Add a line to the Section.
  
          @type  key: string
          @param key: a stable, unique string identifying the line
  
              This should not ever be changed, as dumpstr's labels and
              descriptions are looked up by this key.
  
          @type  points: number, string, list of numbers, or
                         list of pairs of (string label, number)
          @param points: the data, in detail
  
          @type  unit: string
          @param unit: a short string specifying the units for values
  
          @type  summaryFn: list of summary functions
          @param summaryFn: used to create a short summary of the data
  
              See the big comment block under "Summary functions" above.
docstring_summary: Add a line to the Section.
docstring_tokens: Add a line to the Section .
function: def line(self, key, points, unit='',
               summaryFns=[AVG, MAX]):
          """Add a line to the Section.
  
          @type  key: string
          @param key: a stable, unique string identifying the line
  
              This should not ever be changed, as dumpstr's labels and
              descriptions are looked up by this key.
  
          @type  points: number, string, list of numbers, or
                         list of pairs of (string label, number)
          @param points: the data, in detail
  
          @type  unit: string
          @param unit: a short string specifying the units for values
  
          @type  summaryFn: list of summary functions
          @param summaryFn: used to create a short summary of the data
  
              See the big comment block under "Summary functions" above.
          """
  
          if unit:
              spaceUnit = ' ' + unit
          else:
              spaceUnit = ''
  
          if type(points) is str:
              summary = points
          else:
              values = []
              if type(points) is list:
                  for point in points:
                      try:
                          label, point = point
                      except TypeError:
                          pass
                      assert type(point) in [int, float]
                      values.append(point)
              else:
                  assert type(points) in [int, float]
                  values.append(points)
  
              summary = []
              for fn in summaryFns:
                  summary += fn(values, unit)
  
          self.lines.append({'key': key,
                             'summary': summary,
                             'points': points,
                             'unit': unit})
function_tokens: def line ( self , key , points , unit = '' , summaryFns = [ AVG , MAX ] ) : if unit : spaceUnit = ' ' + unit else : spaceUnit = '' if type ( points ) is str : summary = points else : values = [ ] if type ( points ) is list : for point in points : try : label , point = point except TypeError : pass assert type ( point ) in [ int , float ] values . append ( point ) else : assert type ( points ) in [ int , float ] values . append ( points ) summary = [ ] for fn in summaryFns : summary += fn ( values , unit ) self . lines . append ( { 'key' : key , 'summary' : summary , 'points' : points , 'unit' : unit } )