Only Python: Friendly-traceback and IPython: update
source link: https://aroberge.blogspot.com/2022/02/friendly-traceback-and-ipython-update.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Tuesday, February 08, 2022
Friendly-traceback and IPython: update
In my previous post, I mentioned that, unlike IPython, friendly/friendly-traceback included values of relevant objects in a traceback. As I wrote in the update, Alex Hall pointed out that one could get this information by using a verbose mode in IPython. Here is the previous example when using the verbose mode.
In (1) I enabled the verbose mode. In (3), we see its effect. (2) is a reminder of the highlighting when it spans many lines. Regarding the highlighting, here's what I had in the previous blog post:Alex Hall (yes, him again), the author of stack_data used by both IPython and friendly-traceback, suggested that perhaps a better way would be to have a common indentation. This is what I implemented next:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK