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