摘要:
Python之面向对象上下文管理协议 析构函数: 1 import time 2 class Open: 3 def __init__(self,filepath,mode='r',encode='utf-8'): 4 self.f=open(filepath,mode=mode,encoding= 阅读全文
posted @ 2018-07-02 12:52
王先生是胖子
阅读(189)
评论(0)
推荐(0)
摘要:
Python之面向对象slots与迭代器协议 slots: 1 # class People: 2 # x=1 3 # def __init__(self,name): 4 # self.name=name 5 # def run(self): 6 # pass 7 8 9 # print(Peop 阅读全文
posted @ 2018-07-02 12:51
王先生是胖子
阅读(173)
评论(0)
推荐(0)

浙公网安备 33010602011771号