我正在使用Google的webapp框架.
我在下面尝试做的只是将query.fetch的结果发送到一个函数,该函数将获取结果并使用它们创建一个表.
class Utilities():
def create_table(results):
#Create a table for the results....
Run Code Online (Sandbox Code Playgroud)
变量results从query.fetch返回两个结果
results = query.fetch(10) #This returns two results
util = Utilities()
util.create_table(results)
Run Code Online (Sandbox Code Playgroud)
然后我得到了错误
util.create_table(results)TypeError:create_table()只取1个参数(给定2个)
我以为results会自动通过引用传递.我错了吗?