这可能不再正确,或者您检查元素类型的方式无意中触发了评估。
总结一下,您可以使用append()或my_tuple = my_tuple + (foo,)。如果您尝试仅打印这些内容,它将评估QuerySet并输出其内容,但如果您遍历这些集合,则可以使用实际的QuerySet。
>>> a = Author.objects.filter()
>>> b = Book.objects.filter()
>>> type(a), type(b)
(, )
>>> l = []
>>> l.append(a)
>>> l.append(b)
>>> type(l[0]), type(l[1])
(, )
>>> for q in l:
... print type(q)
...
>>> my_tuple = ()
>>> my_tuple = my_tuple + (a,)
>>> type(my_tuple[0])
>>> len(l)
2
>>> len(my_tuple)
1
>>> print l
[[, '...(remaining elements truncated)...'], [,]]
>>> len(my_tuple)
1
>>> print my_tuple
([, '...(remaining elements truncated)...'],)
>>> len(my_tuple)
1
>>>