[issue42524] pdb access to return value

2021-08-03 Thread Irit Katriel


Irit Katriel  added the comment:

It actually is in the locals, and it's called __return__. So you can access it 
with 

locals()['__return__']

I'll try to see where that can be documented.

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42524] pdb access to return value

2020-12-01 Thread Romuald Brunet


Change by Romuald Brunet :


--
keywords: +patch
pull_requests: +22470
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23601

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42524] pdb access to return value

2020-12-01 Thread Romuald Brunet


New submission from Romuald Brunet :

When using the pdb module, there is currently no way to easy access the current 
return value of the stack

This return value is accessed by the 'retval command'

I propose using the currently unused argument to allow storing the return value 
in the local variables, accessible via the debugger

For example:


def foo():
debugger()
return ComplexObject()

def bar():
return foo()

(pdb) retval

(pdb) retval zz
(pdb) zz.attribute
'some value'

--
components: Library (Lib)
messages: 382259
nosy: Romuald
priority: normal
severity: normal
status: open
title: pdb access to return value
type: enhancement
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com