出现bug:if len(sql[‘where’]) > 0
TypeError: string indices must be integers
分析:这种情况通常发生在我们试图对一个非字符串变量使用字符串索引时,故上面的情况上sql并非一个dict,故sql[‘where’]取到的不是一个integers
此时检查代码处理即可
解决~
出现bug:if len(sql[‘where’]) > 0
TypeError: string indices must be integers
分析:这种情况通常发生在我们试图对一个非字符串变量使用字符串索引时,故上面的情况上sql并非一个dict,故sql[‘where’]取到的不是一个integers
此时检查代码处理即可
解决~