def load_name_range(start, end, invalidate=False):
 q = Session.query(Person).filter(Person.name.between(('person %.2d' % start), ('person %.2d' % end))).options(cache_address_bits).options(FromCache('default', 'name_range'))
 q = q.options(RelationshipCache(Person.addresses, 'default'))
 if invalidate:
  q.invalidate()
 return q.all()

def load_name_range ( start , end , invalidate = False ) : q = Session . query ( Person ) . filter ( Person . name . between ( ( 'person %.2d' % start ) , ( 'person %.2d' % end ) ) ) . options ( cache_address_bits ) . options ( FromCache ( 'default' , 'name_range' ) ) q = q . options ( RelationshipCache ( Person . addresses , 'default' ) ) if invalidate : q . invalidate ( ) return q . all ( )
load person objects on a range of names .