--On 13. Oktober 2007 21:30:05 +0200 Sascha Welter <[EMAIL PROTECTED]> wrote:

Hello Zopistas!

This pattern here is very common in many people's Zope products:

    try: u=self.DestinationURL()
    except: u=REQUEST['URL1']

All those people should burn ...

It's usually in the manage_addXY() method, when all the work is done, we
test for REQUEST!=None and we want to know where to redirect to.

Is there a reason for that bare except here? Wouldn't
except AttributeError: ... do the job just as well?

Basically yes - unless the method being called might raise other
errors as well.


Attachment: pgp5MT2K7gOf0.pgp
Description: PGP signature

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

Reply via email to