Усович Алексей, 530 группа UniSize 13798
Жибурт Никита Максимович,316 UniSize 14371
f1def sizer(cls):f1def sizer(cls):
22
3    def get_size(self):3    def get_size(self):
n4        if hasattr(self, '_custom_size'):n4        if hasattr(self, '_size'):
5            return self._custom_size5            return self._size
6        else:
6        try:7            try:
7            return len(self)8                return len(self)
8        except Exception:9            except TypeError:
9            pass
10        try:10                try:
11            return abs(self)11                    return abs(self)
12        except Exception:12                except TypeError:
13            return 013                    return 0
1414
15    def set_size(self, value):15    def set_size(self, value):
n16        self._custom_size = valuen16        self._size = value
1717
18    def del_size(self):18    def del_size(self):
t19        if hasattr(self, '_custom_size'):t19        if hasattr(self, '_size'):
20            del self._custom_size20            del self._size
21    setattr(cls, 'size', property(get_size, set_size, del_size))21    setattr(cls, 'size', property(get_size, set_size, del_size))
22    return cls22    return cls
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op