Капранов Степан Сергеевич 427 ClassOnly 15167 | Вяткина Анна, 619/2 группа ClassOnly 18317 | ||||
---|---|---|---|---|---|
f | 1 | import itertools | f | 1 | import itertools |
n | 2 | attrs = set(map(lambda x: ''.join(x), itertools.product('abcd', repeat=4))) | n | 2 | a = set(map(lambda x: ''.join(x), itertools.product('abcd', repeat=4))) |
3 | 3 | ||||
4 | class Struct: | 4 | class Struct: | ||
n | 5 | __slots__ = [] | n | 5 | __slots__ = () |
6 | 6 | ||||
t | 7 | def __getattribute__(self, name): | t | 7 | def __getattribute__(self, item): |
8 | if name in attrs: | 8 | if item in a: | ||
9 | return name | 9 | return item | ||
10 | raise AttributeError | 10 | raise AttributeError |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|