PROGRAM_MAX_LENGTH = 60*60*3 #3 hoursskiptimes = 0TOTALTIMES = 0
def xxx():
print TOTALTIMES #fine consider it as constant
#TOTALTIMES += 1 #NOT OK
global TOTALTIMES
TOTALTIMES += 1 #OK
python sb 问题,布布扣,bubuko.com
python sb 问题
原文:http://www.cnblogs.com/briller/p/3798795.html