Hi,

Is there any way to "splice" a decorator out of an exception stack
trace?  For example:

>>> def decorator(proc):
...     def internal(*args, **kwargs):
...         return proc(*args, **kwargs)
...     return internal

>>> @decorator
... def foo():
...     assert False, 'simulate failure'

>>> foo()
Traceback (most recent call last):
 ...
 File "<...>", line 1, in <module>
 File "<...>", line 3, in internal
 File "<...>", line 3, in foo
AssertionError: simulate failure

I would like to know if it's possible to somehow end up with this
stack trace instead:

 File "<...>", line 1, in <module>
 File "<...>", line 3, in foo

Thanks in advance,

-Ben

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

Reply via email to