1
Python:超过最大递归深度
我有以下递归代码,在每个节点上我都调用sql查询来获取属于父节点的节点。 这是错误: Exception RuntimeError: 'maximum recursion depth exceeded' in <bound method DictCursor.__del__ of <MySQLdb.cursors.DictCursor object at 0x879768c>> ignored RuntimeError: maximum recursion depth exceeded while calling a Python object Exception AttributeError: "'DictCursor' object has no attribute 'connection'" in <bound method DictCursor.__del__ of <MySQLdb.cursors.DictCursor object at 0x879776c>> ignored 我调用以获得sql结果的方法: def returnCategoryQuery(query, variables={}): …