[issue46102] pdb can't convert dict_values to list

2021-12-16 Thread Christian Heimes


Christian Heimes  added the comment:

list is a pdb command.

(Pdb) help list
l(ist) [first [,last] | .]

List source code for the current file.  Without arguments,
list 11 lines around the current line or continue the previous
listing.  With . as argument, list 11 lines around the current
line.  With one argument, list 11 lines starting at that line.
With two arguments, list the given range; if the second
argument is less than the first, it is a count.

The current line in the current frame is indicated by "->".
If an exception is being debugged, the line where the
exception was originally raised or propagated is indicated by
">>", if it differs from the current line.

You have to use "p list(x.values())" if you want to print the output of the 
list function.

(Pdb) x = {'a': 1}
(Pdb) p list(x.values())
[1]

--
nosy: +christian.heimes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue46102] pdb can't convert dict_values to list

2021-12-16 Thread Aidas Petryla


New submission from Aidas Petryla :

Reproducing:

Running pdb shell (for example "python -m pdb "

Input:
x = {'a': 1}
list(x.values())

Output:
*** Error in argument: '(x.values())'

--
messages: 408714
nosy: apetryla
priority: normal
severity: normal
status: open
title: pdb can't convert dict_values to list
type: behavior
versions: Python 3.9

___
Python tracker 

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