PDB (and other Python debuggers) have a simple way of viewing the value of any current variable, just by typing it in. However, sometimes I work with libraries that don\'t store
You can look into a hidden __return__ local variable.
__return__
If I would forget it's exact name, I explore it by this:
(Pdb) sorted(locals().keys()) ['__return__', 'xyz', ...]
EDIT: Related later answer with example of debugging with __return__