Spe*_*bun 3 python syntax memory-leaks
好吧,今天我在python中遇到了一个奇怪的惊喜.以下代码有效,但似乎违反了python的语法.我不知道为什么没有pass语句或一些代码它会工作,但确实如此.
def test():
'''Sample docstring.'''
for i in range(10):
test()
print "testing", i
Run Code Online (Sandbox Code Playgroud)
我想确定为什么这样做,以及它在运行时是否在内存中留下任何讨厌的位.这可能是我一直试图追查的内存问题的原因.