摘要: 函数的坑 如果你的默认参数指向的是可变的数据类型,无论调用多少次默认参数,都是同一个 #例1def func(name,nlist=[]): nlist.append(name) return nlistret1=func('aa')print(ret1) #['aa']ret2=func('bb' 阅读全文
posted @ 2020-03-12 23:02 枫nian丶 阅读(73) 评论(0) 推荐(0)
摘要: ///////////////////////////////////////////////////////#include <sys/time.h> #include <cstdio>#include <cstdlib>void recordData(char* buf){ static FIL 阅读全文
posted @ 2020-03-12 14:46 枫nian丶 阅读(135) 评论(0) 推荐(0)