文章分类 -  python3

摘要:#使用描述符,定义描述符, class Tyeed: def __init__(self,key,expected_type):#2 self.key=key self.expected_type=expected_type def __get__(self, instance, owner): p 阅读全文
posted @ 2020-01-17 16:56 汉魂县令 阅读(45) 评论(0) 推荐(0)
摘要:# def deco(obj): # print(' ') # return obj # @deco # def test(): # print('运行') # test() def deco(obj): print(' ') obj.z=1 obj.x=5 obj.c=3 return obj @ 阅读全文
posted @ 2020-01-14 15:27 汉魂县令 阅读(77) 评论(0) 推荐(0)