python sb 问题

时间:2014-06-28 12:47:52   收藏:0   阅读:294

PROGRAM_MAX_LENGTH = 60*60*3 #3 hours
skiptimes = 0
TOTALTIMES = 0

 

def xxx():

  print TOTALTIMES       #fine    consider it as constant

  #TOTALTIMES += 1       #NOT OK   

       global TOTALTIMES

  TOTALTIMES += 1   #OK

python sb 问题,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!