mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
18764: remove the problematic 'print' alias for the PDB 'p' command.
So that it no longer shadows the print function. Patch by Connor Osborn, doc and test changes by R. David Murray.
This commit is contained in:
parent
2fe9bac4dc
commit
78d692f98e
5 changed files with 31 additions and 11 deletions
|
|
@ -205,7 +205,8 @@ def test_pdb_breakpoint_commands():
|
|||
... 'enable 1',
|
||||
... 'clear 1',
|
||||
... 'commands 2',
|
||||
... 'print 42',
|
||||
... 'p "42"',
|
||||
... 'print("42", 7*6)', # Issue 18764 (not about breakpoints)
|
||||
... 'end',
|
||||
... 'continue', # will stop at breakpoint 2 (line 4)
|
||||
... 'clear', # clear all!
|
||||
|
|
@ -252,11 +253,13 @@ def test_pdb_breakpoint_commands():
|
|||
(Pdb) clear 1
|
||||
Deleted breakpoint 1 at <doctest test.test_pdb.test_pdb_breakpoint_commands[0]>:3
|
||||
(Pdb) commands 2
|
||||
(com) print 42
|
||||
(com) p "42"
|
||||
(com) print("42", 7*6)
|
||||
(com) end
|
||||
(Pdb) continue
|
||||
1
|
||||
42
|
||||
'42'
|
||||
42 42
|
||||
> <doctest test.test_pdb.test_pdb_breakpoint_commands[0]>(4)test_function()
|
||||
-> print(2)
|
||||
(Pdb) clear
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue