MCPcopy Create free account
hub / github.com/ActiveState/code / Combinative

Class Combinative

recipes/Python/415345_write_sql_via_python/recipe-415345.py:273–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271 return Not(boolexpr)
272
273class Combinative(object):
274
275 def combine(cls, *combinatives):
276 args = []
277 for c in combinatives:
278 if type(c) is cls:
279 args.extend([e for e in c.elements if e])
280 else:
281 args.append(c)
282 return cls(*args)
283 combine = classmethod(combine)
284
285class InfixedExpression(Infixed, Expression):
286 def __init__(self, infix, *expressions):

Callers

nothing calls this directly

Calls 1

classmethodFunction · 0.50

Tested by

no test coverage detected