

def get_initial_value(self, obj, **kwargs):
    '\n        Builds a list of values provided by :py:attr:`.sources` looked up on the target ``obj``.\n        Each source may provide a value as a 2-tuple of ``(plain_value, rich_value)``, where\n        ``plain_value`` is the sortable raw value, and ``rich_value`` is possibly something else\n        that can be coerced to a string for display purposes. The ``rich_value`` could also be a\n        string with HTML in it.\n\n        If no 2-tuple is given, then ``plain_value`` and ``rich_value`` are taken to be the same.\n\n        Columns with multiple :py:attr:`.sources` will have their ``rich_value`` coerced to a string\n        and joined with :py:attr:`.separator`, and this new concatenated string becomes the final\n        ``rich_value`` for the whole column.\n\n        If all :py:attr:`.sources` are ``None``, :py:attr:`.empty_value` will be used as the\n        ``rich_value``.\n        '
    values = []
    for source in self.sources:
        result = self.get_source_value(obj, source, **kwargs)
        for value in result:
            if isinstance(value, Model):
                value = (value.pk, value)
            if (value is not None):
                if (not isinstance(self, (tuple, list))):
                    value = (value, value)
                values.append(value)
    if (len(values) == 1):
        value = values[0]
        if ((value is None) and (self.empty_value is not None)):
            value = self.empty_value
    elif (len(values) > 0):
        plain_value = [v[0] for v in values]
        rich_value = self.separator.join(map(six.text_type, [v[1] for v in values]))
        value = (plain_value, rich_value)
    else:
        value = self.empty_value
    return value

dataset/ETHPy150Open pivotal-energy-solutions/django-datatable-view/datatableview/columns.py Column.get_initial_value/VarMisuse@88/445 `value`->`self`