rmanzhos UniSize 13348
Пономаренко Вячеслав Сергеевич, 525 группа UniSize 13292
n1class Size:n1class Descr:
22
3    def __get__(self, obj, cls):3    def __get__(self, obj, cls):
n4        flds = dir(cls)n4        c_dir = dir(cls)
5        if '__len__' in flds:5        if '__len__' in c_dir:
6            return len(obj)6            return len(obj)
n7        elif '__abs__' in flds:n7        elif '__abs__' in c_dir:
8            return abs(obj)8            return abs(obj)
9        else:9        else:
10            return 010            return 0
1111
12def sizer(cls):12def sizer(cls):
t13    cls.size = Size()t13    cls.size = Descr()
14    return cls14    return cls
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op