我的python版本为3.5,进入安装目录找到帮助文档。里面的例子,源代码为啥不能执行?
例如,3.2的新功能,threading模块。有下面代码
from threading import Barrier, Thread
def get_votes(site):
ballots = conduct_election(site)
all_polls_closed.wait() # do not count until all polls are closed
totals = summarize(ballots)
publish(site, totals)
all_polls_closed = Barrier(len(sites))
for site in sites:
Thread(target=get_votes, args=(site,)).start()
根本执行不了呀