The problem here is not lambdas: lambda functions have debugging information.
a = lambda: 1
print a.func_code.co_filename
print a.func_code.co_firstlineno
( a.__code__in python3.)
The problem is formatting the throwing exception: it does not show the stack trace where this information is usually displayed.
, , , Python/errors.c, PyErr_WriteUnraisable(). , - , - , , . "tb" PyErr_Fetch().