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 _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )