In Python 3.5 I am trying to get the values from a dictionary like so:
data_dict.values()
# result: dict_values(['117487614', '117487614', '117487614'])
Now if I try to convert this into a list
list(data_dict.values())
I get an error:
*** Error in argument: '(data_dict.values())'
These expressions are being executed inside ipdb
:
ipdb> patterns_and_values
{'value_{}.mainContent_root_pwdPin': '85785226',
'value_{}.mainContent_root_txtBenutzerkennung': '85785226',
'value_{}.mainContent_root_txtRZBK': '85785226'}
ipdb> patterns_and_values.values()
dict_values(['85785226', '85785226', '85785226'])
ipdb> list(patterns_and_values.values())
*** Error in argument: '(patterns_and_values.values())'
You're using the ipdb
command list
from what I can understand. If ipdb
follows the interface defined by pdb
this doesn't invoke the list()
function as you'd expect.
Exit the ipdb
debugger to get this to work correctly or, again if ipdb
uses the same commands as ipdb
, use p list(patterns_and_values.values())
in order to get an expression evaluated inside the debugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With