code: def avg(self):
          
          # XXX rename this method
          if len(self.values) > 0:
              return sum(self.values) / float(len(self.values))
          else:
              return None
docs: return the mean value