This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author moi90
Recipients andrei.avk, iritkatriel, jbw, kj, moi90, serhiy.storchaka
Date 2021-10-28.19:39:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635449962.55.0.908214815191.issue43656@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2021-10-28 19:39:22moi90setrecipients: + moi90, serhiy.storchaka, iritkatriel, kj, andrei.avk, jbw
2021-10-28 19:39:22moi90setmessageid: <1635449962.55.0.908214815191.issue43656@roundup.psfhosted.org>
2021-10-28 19:39:22moi90linkissue43656 messages
2021-10-28 19:39:22moi90create
Morty Proxy This is a proxified and sanitized view of the page, visit original site.