0
我似乎有一个Manager.dict()
传递给函数列表(在子进程内)的问题,因为当我在函数内修改它时,新值isn' t可在外面使用。 创建我的函数列表如下:通过参考位编码函数列表传递字典
gwfuncs = [reboot, flush_macs, flush_cache, new_gw, revert_gw, send_log]
gw_func_dict = dict((chr(2**i), gwfuncs[i]) for i in xrange(0,min(len(gwfuncs),8)))
,然后调用它像这样:
for bit in gw_func_dict.keys():
if gwupdate & ord(bit) == ord(bit):
gw_func_dict[bit](fh, maclist)
现在假设我们正在谈论flush_macs()
,无论我到maclist功能做的,没有按这似乎不会影响我的功能之外的男性主义者 - 这是为什么?我如何以外部可用的方式修改它?