Static variables in python
ints are not modifiable, so += actually rebinds the variable. Try:
def_f():
global global_var_c_hits
global_var_c_hits +=1
ints are not modifiable, so += actually rebinds the variable. Try:
def_f():
global global_var_c_hits
global_var_c_hits +=1
No comments:
Post a Comment