I think there is a problem with and then say this like this: Now we talk about the After Add some brackets and this will work: In addition, you can make your code a little easier: And if you have Python 2.7 +: In addition, the default Repeating a dictionary on your keys as a form More repetition than that, so that you can extract from Manager.dict () which is in the list When it is done (within a sub-process), when I modify it within the function, the new value is not available outside. To create a list of such tasks:
gwfuncs = [reboot, flush_macs, flush_cache, new_gw, revert_gw, send_log] gw_func_dict = dict ((chr (2 ** i) gwfuncs [I]) for xrange (0, min (lane (gwfuncs), 8)) in
in Gw_func_dict.keys (): if gwupdate & amp; Ord (bit) == ord (bit): gw_func_dict [bit] (FH, maclist)
flush_macs () , Whatever I am doing in the MacList function, does not affect the Maclit outside my function - why is it? How can I modify it that is available outside of your changes?
==
and So your
if statement actually works like this:
if gwupdate & amp; (Ord (bit) == ord (bit)):
if (gwupdate & amp; bit) ) == ord (bit):
gw_func_dict = dict (( For chr (2 * * I, func), fun in Enkaneer (gwfuncs [: 8]))
< Using the code> gw_func_dict = {chr (2 ** i): function for calculating function, (gwfuncs [: 8])}
.keys () to your
from
loop:
in gw_func_dict:
No comments:
Post a Comment