您的位置:首页 > 移动开发 > Objective-C

When to Use Object-oriented Programming(Chapter 5 of Python 3 Object Oriented Programming)

2010-09-02 20:52 856 查看
code 1 class Silly:
2
3 @property
4 def silly(self):
5 "This is a silly property"
6 print("You are getting silly")
7 return self._silly
8
9 @silly.setter
def silly(self, value):
print("You are making silly {}".format(value))
self._silly = value

@silly.deleter
def silly(self):
print("Whoah, you killed silly!")
del self._silly
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: