所以我有密码
def constructGraph(self,url,doit=5):
if doit!=0:
m = urllib.request.urlopen(url)
print('test')
self.constructGraph('http://example.com',doit-1)
但是当我运行它时,它只运行第一个m = urllib.request.urlopen(url)
,并且只打印一次测试,尽管它应该执行两次。。。在
当我运行调试器时,它甚至不会转到第二次递归的print('test')行,而只会退出
我做错什么了?在
我用的是python3
也许一次只能打开一个请求。尝试在urlopen调用之前放置print语句。在
相关问题 更多 >
编程相关推荐