blob: 91cf86cfd96addb8c9ffb1b427b0aa69b0465f22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# pylint: disable=missing-docstring,invalid-name,too-few-public-methods
# https://github.com/PyCQA/pylint/issues/2439
class TestClass:
__slots__ = ["_i"]
def __init__(self):
self._i = 0
@property
def i(self):
return self._i
@i.setter
def i(self, v):
self._i = v
other = i
instance = TestClass()
instance.other = 42
print(instance.i)
|