1
如何使用默认的空参数调用pymongo sort()函数,所以我不会进行排序。Pymongo,空排序
collection.find(params).sort([])
ValueError: key_or_list must not be the empty list
collection.find(params).sort({})
TypeError: if no direction is specified, key_or_list must be an instance of list
collection.find(params).sort([{}])
ValueError: not enough values to unpack (expected 2, got 0)
在蒙戈控制台我可以
db.collection.find().sort({})