On 7/1/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote:
> i think there should be no functional difference in the two code snippets
> below, but is there any difference in performance?
Don't know, and don't care; these are (at the Python level)
> (i know, the "except AttributeError" could possibly mask an AttributeError
> in the called function...)
Exactly. Shouldn't be a real issue in a released version, but better
safe than sorry.
> hook = getattr(o, '_before_transaction_commit', None)
> if hook: hook()
hook = getattr(o, '_before_transaction_commit', None)
if hook is not None: hook()
Fred L. Drake, Jr. <fdrake at gmail.com>
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -