Runsun Pan <[EMAIL PROTECTED]> wrote: ... > or, more specific, a function/method-specific error > handling feature: > > c.load.onError( IOErrorHook) > c.load( filename ) > > Is there such a mechnism around? If not, is it possible > to make such a thing ?
Never heard of one, but you could surely make a custom metaclass satisfying your specs (==wrapping each method into an instance of a type providing such an onError method, as well as a __call__ delegating to the real method within a suitable try/except). Sounds like a lot of work to me, though;-). Alex -- http://mail.python.org/mailman/listinfo/python-list