本文整理汇总了Python中asq.queryables.Queryable.then_by_descending方法的典型用法代码示例。如果您正苦于以下问题:Python Queryable.then_by_descending方法的具体用法?Python Queryable.then_by_descending怎么用?Python Queryable.then_by_descending使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类asq.queryables.Queryable
的用法示例。
在下文中一共展示了Queryable.then_by_descending方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_then_by_descending_closed
# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import then_by_descending [as 别名]
def test_then_by_descending_closed(self):
a = ['sort', 'using', 'third', 'letter', 'then', 'second']
b = Queryable(a).order_by(lambda x: x[2])
b.close()
self.assertRaises(ValueError, lambda: b.then_by_descending(lambda x: x[1]))
示例2: test_then_by_descending_not_callable
# 需要导入模块: from asq.queryables import Queryable [as 别名]
# 或者: from asq.queryables.Queryable import then_by_descending [as 别名]
def test_then_by_descending_not_callable(self):
a = ['sort', 'using', 'third', 'letter', 'then', 'second']
b = Queryable(a).order_by(lambda x: x[2])
self.assertRaises(TypeError, lambda: b.then_by_descending("not callable"))