def __init__(self, name=None, description=None, owner=None,
                 privileges=None, **attrs):
        self.name = name
        self.description = description
        self.owner = owner
        if isinstance(privileges, strtypes):
            privileges = privileges.split(',')
        self.privileges = privileges or []
        for key, val in list(attrs.items()):
            if val or key in self.keylist:
                if key in ['definition', 'description', 'source'] and \
                        isinstance(val, strtypes) and '\n' in val:
                    newval = []
                    for line in val.split('\n'):
                        if line and line[-1] in (' ', '\t'):
                            line = line.rstrip()
                        newval.append(line)
                    strval = '\n'.join(newval)
                    if PY2:
                        val = strval.encode('utf_8').decode('utf_8')
                    else:
                        val = MultiLineStr(strval)
                setattr(self, key, val)
Validation.
dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/__init__.py/DbObject.__init__--crossover with--dataset/ETHPy150Open pallets/click/examples/validation/validation.py/cli