@logged()
    def get_experiment_uses_by_id(self, user_login, reservation_ids):

        results = []
        session = self.Session()
        try:
            user = session.query(model.DbUser).filter_by(login = user_login).first()
            if user is None:
                return [self.forbidden_access] * len(reservation_ids)

            for reservation_id in reservation_ids:
                experiment_use = session.query(model.DbUserUsedExperiment).filter_by(reservation_id = reservation_id.id).first()
                if experiment_use is None:
                    results.append(None)
                else:
                    if experiment_use.user == user:
                        results.append(experiment_use.to_business())
                    else:
                        results.append(self.forbidden_access)
        finally:
            session.close()

        return results
Implements the [] operator. Used to set property value(s).
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/db.py/DatabaseGateway.get_experiment_uses_by_id--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore.py/Entity.__setitem__