Hello all -

I was wondering about the performance implications of explicitly
raising exceptions to get information about the current frame.
Something like what the inspect module does, with:

---
def currentframe():
    """Return the frame object for the caller's stack frame."""
    try:
        raise 'catch me'
    except:
        return sys.exc_traceback.tb_frame.f_back
---

I come from a java background, where Exceptions are a big Avoid Me, but
are the performance implications the same in Python? We're expecting a
big load on our app (100,000 users/hour) , so we'd like to be as tuned
as possible.

Thanks,
leo

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to