1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
import pysnooper
K = 0
def (i): global K K += 1 j = i ** 2 return j
def g(i): global K K += 1 j = i + f(i) return j
@pysnooper.snoop("test.main.log", depth=1) def main(): for i in range(4): print(g(i))
if __name__ == '__main__': main()
|
近期评论