-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-42524: pdb: additional documentation on retval #27612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,7 @@ def test_pdb_basic_commands(): | |
... 'jump 8', # jump over second for loop | ||
... 'return', # return out of function | ||
... 'retval', # display return value | ||
... '__return__', # access the return value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the function returns a string, this test doesn't really check that |
||
... 'next', # step to test_function3() | ||
... 'step', # stepping into test_function3() | ||
... 'args', # display function args | ||
|
@@ -140,7 +141,7 @@ def test_pdb_basic_commands(): | |
[EOF] | ||
(Pdb) bt | ||
... | ||
<doctest test.test_pdb.test_pdb_basic_commands[4]>(25)<module>() | ||
<doctest test.test_pdb.test_pdb_basic_commands[4]>(26)<module>() | ||
-> test_function() | ||
<doctest test.test_pdb.test_pdb_basic_commands[3]>(3)test_function() | ||
-> ret = test_function_2('baz') | ||
|
@@ -185,6 +186,8 @@ def test_pdb_basic_commands(): | |
-> return foo.upper() | ||
(Pdb) retval | ||
'BAZ' | ||
(Pdb) __return__ | ||
'BAZ' | ||
(Pdb) next | ||
> <doctest test.test_pdb.test_pdb_basic_commands[3]>(4)test_function() | ||
-> test_function3(kwonly=True) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this sentence fits better in the documentation here: https://docs.python.org/3/library/pdb.html#pdbcommand-retval
For the docstring it's not really appropriate to point to an alternative.