Andreas Jung wrote:



--On 14. Dezember 2005 12:54:56 -0700 Nikko Wolf <[EMAIL PROTECTED]> wrote:

So you could try this instead:

    for item in itemList:
       try:
          context.afolder.manage_delObjects([item])
       except:
          continue


Wahhhh... DON'T DO THAT. You should *never* use bare try..excepts within Zope applications. This can lead to strange and unpredictable behavior.

Can you elaborate on what "strange and unpredictable behavior" you mean? I'm curious in general, but especially w.r.t. the code above?

BTW, a simple grep of sources in Zope (2.7.6-final) turns up 600+ places where a bare except is used, and my Zope instance (which uses Plone) contains over 350 more.

Cheers,
Nikko


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to