Martin <martin.schroe...@nerdluecht.de> added the comment:
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? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43656> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com