Мироненко Андрей Андреевич 618/1 DataClass 13070
kotopesutility DataClass 12733
n1def sloter(slots, default):n1def sloter(fields, default):
22
n3    class Sloter:n3    class klass:
4        __slots__ = slots4        __slots__ = fields
55
6        def __init__(self):6        def __init__(self):
n7            for i in self.__slots__:n7            for field in klass.__slots__:
8                setattr(self, i, default)8                setattr(self, field, default)
99
n10        def __delattr__(self, s):n10        def __delattr__(self, attr):
11            setattr(self, s, default)11            setattr(self, attr, default)
1212
13        def __iter__(self):13        def __iter__(self):
t14            for i in self.__slots__:t14            for attr in self.__slots__:
15                yield getattr(self, i)15                yield getattr(self, attr)
16    return Sloter16    return klass
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op