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功能做的,沒有按這似乎不會影響我的功能之外的男性主義者 - 這是爲什麼?我如何以外部可用的方式修改它?