Pastebin

Paste #2878: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

input={"mm_foot_length":10}
offsets={"mm_foot_length":(1O,5)}
and_=sqlalchemy.sql.expression.and_
filter=and_(
  *list(
     and_(
          getattr(Footwear,k) >= v + offsets[k][0],
          getattr(Footwear,k) <= v + offsets[k][1]
     )
  ) for k,v in input.values()
)
query.filter(filter)

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.