摘要: A.授权方式 : 1 import time 2 class Open: 3 def __init__(self,filepath,mode = 'r',encoding='utf-8'): 4 self.x = open(filepath, mode=mode, encoding=encoding 阅读全文
posted @ 2017-04-24 23:59 福临 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 1 class People: 2 """ 3 hasattr,setattr,getattr,delattr原理:所有的对象或者类如果有设定相应的key,value,那么在对应的__dict__ 4 这个返回值中都有key,value存在的, 5 6 """ 7 def __init__(self 阅读全文
posted @ 2017-04-24 23:27 福临 阅读(147) 评论(0) 推荐(0) 编辑