Suggestion: append info about code block number in filename
- 主要语言
- Python
- 星标
- 734
- 派生
- 412
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 8
描述
When using IPython, the "filename" contains the number information of the code block that contains it; this is something of the form `` where `N` is the code block number.

When actual temporary files are used in the ipykernel, the names created on https://github.com/ipython/ipykernel/blob/b2f1a79f64c49a1c54f2e7c79c062d6b347b9bf0/ipykernel/compiler.py#L50 lose that information.
My suggestion would be to append `_number` to the filename where `number` is the code block number. So, instead of `path/to/filename.py` one would have `path/to/filename_number.py`. This would enable a human reader to identify which code block is involved in the traceback.
Additionally, while it is currently possible to programmatically obtain the information and having a "filename" much more understable, as demonstrated in the image below, there can be some ambiguity if the exact same content appears in two code blocks, one of which appearing in a traceback (as shown in the second traceback in the image below).
Adding the `_number` would remove this ambiguity.

贡献指南
评估
这个 Issue 还没有评估数据。