1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
>>> class K(object):
...     __slots__ = ("a", "b")
... 
>>> K.a
<member 'a' of 'K' objects>
>>> K.b
<member 'b' of 'K' objects>
>>> my_k = K()
>>> my_k.a = "Hello"
>>> K.a.__get__(my_k, K)
'Hello'
>>> 
>>> K.a.__set__(my_k, "World")
>>> my_k.a
'World'