17 Mar
2004
17 Mar
'04
10:37 a.m.
Chris Withers wrote:
return [brain.getObject() for brain in self.__catalog(p_criteria)]
...seems a LOT nicer to me.
You should at least check that getObject() does not return a None object. Which it can *very* easily do! result = [] for brain in self.__catalog(p_criteria): obj = brain.getObject() if not obj is None: result.append(obj) return result regards Max M -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science