blob: 784dd90d40aa25ead89d4420e6e648f23cd264db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
"""Calling a super property"""
# pylint: disable=too-few-public-methods,invalid-name
class A:
"""A parent class"""
@property
def test(self):
"""A property"""
return "test"
class B:
"""A child class"""
@property
def test(self):
"""Overriding implementation of prop which calls the parent"""
return A.test.fget(self) + " overriden"
if __name__ == "__main__":
print(B().test)
|