摘要:
修改自http://blog.csdn.net/sedgewick/article/details/6774419基本是直译代码的.原理我把图拷过来了.代码总体还是很简单的..import stacklessdef generate(ch): for i in range(2,1000): ch.send(i) def filter(in_ch,out_ch,primer): while True: i = in_ch.receive() if i % primer != 0 : out_ch.s... 阅读全文