Валиахметов Булат, 603 группа ClassOnly 14952 | Бедрин Павел Александрович, 428 группа ClassOnly 15054 | ||||
---|---|---|---|---|---|
f | 1 | from itertools import product | f | 1 | from itertools import product |
n | 2 | ATTRS = set((''.join(seq) for seq in product('abcd', repeat=4))) | n | 2 | slots = set((''.join(t) for t in product('abcd', repeat=4))) |
3 | 3 | ||||
4 | class Struct: | 4 | class Struct: | ||
5 | __slots__ = () | 5 | __slots__ = () | ||
6 | 6 | ||||
t | 7 | def __getattribute__(self, item): | t | 7 | def __getattribute__(self, attr): |
8 | if item in ATTRS: | 8 | if attr in slots: | ||
9 | return item | 9 | return attr | ||
10 | else: | ||||
11 | raise AttributeError | 10 | raise AttributeError |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|