如果看一下定义迭代器的PEP234,它会显示:
1. An object can be iterated over with "for" if it implements __iter__() or __getitem__().2. An object can function as an iterator if it implements next().
欢迎分享,转载请注明来源:内存溢出
如果看一下定义迭代器的PEP234,它会显示:
1. An object can be iterated over with "for" if it implements __iter__() or __getitem__().2. An object can function as an iterator if it implements next().
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)