[Zope] Search a Catalog in Python

Max M maxm at mxm.dk
Thu Mar 18 01:32:08 EST 2004


Dieter Maurer wrote:

 > Max M wrote at 2004-3-16 18:50 +0100:
 >
 >>    try:
 >>        obj = brain.getObject()
 >>        result.append(obj)
 >>    except: # Will probably raise AttributeError on None object
 >>        pass
 >
 >
 > You are proposing here a so called "bare" "try ... except".
 >
 > Such "try ... except"s are wide spread in the Zope sources.
 > They have been the cause of many many difficult to analyse
 > problems. Therefore, they are considered bad.

I know, that was why I added the comment. So that the corrects exception 
could be catched. But I was to lazy to do it correctly, as it wasn't in 
code i was going to use myself.

-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the Zope mailing list