Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)

src/x/o/xotl.ql-0.2.1dev/tests/test_design_decision.py   xotl.ql(Download)
def test_complex_query_building_with_dict():
    from xotl.ql.expressions import min_, max_
    with bubbling() as current:
        d = {parent.age: (min_(child.age), max_(child.age))
             for parent in this('parent')
    child = parent.children
    ok(parent.age)  # The key of the dict is the top-most expression
    ok(child.age < 5)

src/x/o/xotl.ql-0.2.1dev/tests/test_expressions.py   xotl.ql(Download)
            # Py3k
            from operator import truediv as div
        from xotl.ql.expressions import count, min_, max_, all_, any_, length
        from xotl.ql.expressions import contains, is_instance, invoke, new
        from xotl.ql.expressions import startswith, endswith

src/x/o/xotl.ql-0.2.1dev/tests/test_ordering.py   xotl.ql(Download)
    def test_ordering_expressions_are_buildable(self):
        from xotl.ql.expressions import max_
        these((parent for parent in this),
              ordering=lambda parent: +(max_(child.age for child in parent.children)/parent.age))