[issue42524] [doc] pdb access to return value

Irit Katriel report at bugs.python.org
Tue Aug 3 18:57:37 EDT 2021


Irit Katriel <iritkatriel at gmail.com> added the comment:

I just noticed your PR. Would you like to continue working on this?

I think we should update the documentation of retval (in the doc and in the function's doctring) to say:

"""
retval
Print the return value for the last return of a function.  Alternatively, the return value can be accessed with ``locals()['__return__']``.
"""

Then add unit tests and examples as you did.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42524>
_______________________________________


More information about the Python-bugs-list mailing list