Describe the bug
It looks like tracebacks stopped collecting/printing locals if they are functions or classes as part of commit e91e5a2. Unfortunately the commit doesn't describe why (it just says "simplify"). Specifically, it's this line that was introduced: if not (inspect.isfunction(value) or inspect.isclass(value)). It can be very useful to see these. Would a patch be accepted that either reverts that one line (preferable), or re-introducing it behind a kwarg be accepted?