Ищенко Светлана Сергеевна, 316 UniSize 13777 | Байдецкая Марина 319/2 UniSize 14106 | ||||
---|---|---|---|---|---|
n | 1 | class fun: | n | 1 | class UniSize: |
2 | 2 | ||||
n | 3 | def __get__(self, obj, objtype): | n | 3 | def __get__(self, obj, _): |
4 | try: | 4 | try: | ||
5 | return len(obj) | 5 | return len(obj) | ||
6 | except TypeError: | 6 | except TypeError: | ||
7 | try: | 7 | try: | ||
8 | return abs(obj) | 8 | return abs(obj) | ||
9 | except TypeError: | 9 | except TypeError: | ||
10 | return 0 | 10 | return 0 | ||
11 | 11 | ||||
t | 12 | def sizer(cls): | t | 12 | def sizer(clas): |
13 | cls.size = fun() | 13 | clas.size = UniSize() | ||
14 | return cls | 14 | return clas |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|