Message202579
Yes, I suggest using ExitStack to figure out the behaviour we *want* first,
before diving into the messy practical details of how to make that a
reality in CPython. We somehow have to get the state of the exception
object and its traceback to represent an appropriate stack *tree*, rather
than the traditionally assumed linear stack.
It also occurred to me there's another potentially related issue: frame
hiding, where we want to avoid showing infrastructure code in end user
tracebacks. importlib currently has a very hacky version of that. The
Jinja2 template library uses a different approach.
The reason I bring these other problems up is because I think they
illustrate a theme around altering how a traceback is displayed that may be
amenable to a common solution (preferably one that is contextlib and
asyncio friendly). |
|
Date |
User |
Action |
Args |
2013-11-10 22:16:33 | ncoghlan | set | recipients:
+ ncoghlan, hniksic, benjamin.peterson, nikratio, alonho |
2013-11-10 22:16:33 | ncoghlan | link | issue18861 messages |
2013-11-10 22:16:33 | ncoghlan | create | |
|