python 函数默认值的小坑啊
import datetime import time def test(day=datetime.datetime.now()): print day while True: test() time.sleep(1) run result: 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000 2015-06-05 16:52:47.106000