Message405238
Once again a very good summary, thanks Joe!
> it would be quite useful if this function parameter was given not just the local variable values, but also the name of the local variable and maybe also the stack frame it is in
So this would be something like `format_locals(filename, lineno, name, locals) -> dict[str,str]` that could be used inside FrameSummary.__init__. I like that!
I wouldn't bother with detecting un-repr-able objects in Python itself, but if the above `format_locals` was implemented, you could easily prepare such a formatter for your students that hides `self` et al. and/or catch exceptions during `repr` to your liking.
What is needed to get an OK for such a change? |
|
| Date |
User |
Action |
Args |
| 2021-10-28 19:39:22 | moi90 | set | recipients:
+ moi90, serhiy.storchaka, iritkatriel, kj, andrei.avk, jbw |
| 2021-10-28 19:39:22 | moi90 | set | messageid: <1635449962.55.0.908214815191.issue43656@roundup.psfhosted.org> |
| 2021-10-28 19:39:22 | moi90 | link | issue43656 messages |
| 2021-10-28 19:39:22 | moi90 | create | |
|