properties work now also with initialization values of classes

This commit is contained in:
David Halter
2012-07-10 17:52:46 +02:00
parent e4739fddf9
commit 53358b28d3
5 changed files with 26 additions and 9 deletions

View File

@@ -66,6 +66,23 @@ nothing("")[0]
#? str()
nothing("")[1]
# -----------------
# properties
# -----------------
class PropClass():
def __init__(self, a):
self.a = a
@property
def ret(self):
return self.a
#? str()
PropClass("").ret
#? []
PropClass().ret.
# -----------------
# not found decorators
# -----------------