circuitpython/tests/basics/core_class_superproperty.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
244 B
Python
Raw Normal View History

"""
test that calling super() getter property in subclass will return the value
"""
2021-04-20 01:22:44 -04:00
class A:
@property
def p(self):
2021-04-20 01:22:44 -04:00
return {"a": 10}
class AA(A):
@property
def p(self):
return super().p
2021-04-20 01:22:44 -04:00
a = AA()
print(a.p)