diff options
author | Damien George <damien.p.george@gmail.com> | 2018-05-25 10:59:40 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-25 10:59:40 +1000 |
commit | dfeaea144168c3ec3b4ec513cfb201ce93f99f5e (patch) | |
tree | 992f2101b5782d0423db9023a8c56fac413463e6 /tests/basics/builtin_property.py | |
parent | 15ddc2043687942c68d9ab54176fd837f44d3083 (diff) |
py/objtype: Remove TODO comment about needing to check for property.
Instance members are always treated as values, even if they are properties.
A test is added to show this is the case.
Diffstat (limited to 'tests/basics/builtin_property.py')
-rw-r--r-- | tests/basics/builtin_property.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/builtin_property.py b/tests/basics/builtin_property.py index 89c3d4936..4b08ee9d3 100644 --- a/tests/basics/builtin_property.py +++ b/tests/basics/builtin_property.py @@ -105,3 +105,9 @@ class E: # not tested for because the other keyword arguments are not accepted # q = property(fget=lambda self: 21, doc="Half the truth.") print(E().p) + +# a property as an instance member should not be delegated to +class F: + def __init__(self): + self.prop_member = property() +print(type(F().prop_member)) |