summaryrefslogtreecommitdiff
path: root/tests/functional/r/regression_02/regression_property_slots_2439.py
blob: 43882b3acde117d9252670351ec999f2da402fc8 (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/pylint-dev/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)