Майоров Егор Андреевич, 527 группа MixNamespace 11108
Демихов Валентин, 611 группа MixNamespace 10257
n1class Mixed:n1class Mix:
22
3    def __init__(self, **kwargs):3    def __init__(self, **kwargs):
4        self.__dict__.update(kwargs)4        self.__dict__.update(kwargs)
55
6    def __str__(self):6    def __str__(self):
n7        return ', '.join((f'{key}={val}' for key, val in sorted(self.__dn7        return ', '.join((f'{key}={value}' for key, value in sorted(self
>ict__.items())))>.__dict__.items())))
88
9def mix(*args):9def mix(*args):
t10    res = {}t10    comb = {}
11    for arg in args:11    for a in args:
12        for key in dir(arg):12        for c in dir(a):
13            if not key.startswith('_') and (not callable(getattr(argke13            if not c.startswith('_') and (not callable(getattr(a, c))):
>y))): 
14                res[key] = getattr(argkey)14                comb[c] = getattr(a, c)
15    return Mixed(**res)15    return Mix(**comb)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op