def __init__(self, values=None, comment=None):
    '''
    Create a new Values object. First arg may be a dictionary or list of
    pairs. Items with value None are skipped. If list of pairs is used, order is
    preserved.
    '''
    if not values:
      values = {}
    self.values = []
    if type(values) == dict:
      self.values = [(k, str(values[k])) for k in sorted(values) if values[k] is not None]
    elif type(values) == list:
      self.values = [(k, str(v)) for (k, v) in values if v is not None]
    else:
      raise InvalidArgument("invalid values of type %s" % type(values))
    self.comment = comment
dataset/ETHPy150Open bloomreach/zinc/zinc.py/Values.__init__/original