1 Apr
2005
1 Apr
'05
9 p.m.
Max M wrote at 2005-3-31 14:48 +0200:
... Most of my queries, where I need to wake up objects, has the form::
brains = catalog(portal_type='Document') objects = [] for brain in brains: try: obj = brain.getObject() if not obj is None: objects.append(obj) except: pass
So it will not break any of my code, and I guess that most do something similar.
Hopefully not: "try: ... except: ..." is a powerful receipe to hide problems and to get low quality code. They should be used *very* rarely... -- Dieter