摘要:
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= 阅读全文
摘要:
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 阅读全文