On 15.11.13 00:02, Greg Ewing wrote:
Walter Dörwald wrote:
Unfortunaty the frame from the decorator shows up in the traceback.
Maybe the decorator could remove its own frame from
the traceback?
True, this could be done via either an additional attribute on the
frame, or a special value for frame.f_annotation.
Would we want to add frame annotations to every function call in the
Python stdlib? Certainly not. So which functions would get annotations
and which ones won't?
When we have many annotations, doing it with a decorator might be a
performance problem, as each function call goes through another stack level.
Is there any other way to implement it?
Servus,
Walter
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com