我得到了一个TypeError:不是所有在我的python脚本中的字符串格式化错误期间转换的参数。FROM users WHERE id = (SELECT userId FROM cards WHERE tagId=%s LIMIT 1)",(tagId))
File "/usr/lib/python2.7
我目前正在构建一段代码,该代码从我正在使用的数据源提供的元组中组合业务对象。由于这些元组的长度和命名可能不同,因此我想在for循环中插入一个预定义的元组。for class_attributes in answer:
# I would want to access them dynamically in here, instead Pythonis using "class_attributes" as a local variable inside the for