title: Why does casting dict_keys as a list not work in pdb?
body: <p>Following the canonical advice of this <a href="https://stackoverflow.com/questions/17322668/typeerror-dict-keys-object-does-not-support-indexing">post</a>, I am trying to cast my <code>dict_keys</code> object to a list.  It works in the python 3.6.5 interpreter just fine.  However, when I do it in <code>pdb</code>, it does not work.  E.g.</p>
  
  <pre><code>&gt;&gt;&gt; import pdb; pdb.set_trace()
  --Return--
  &lt;function save_history at 0x100369e18&gt;
  &gt; &lt;stdin&gt;(1)&lt;module&gt;()-&gt;None
  (Pdb) newdict = dict()
  (Pdb) newdict["pig"] = "pink"
  (Pdb) newdict["finch"] = "yellow"
  (Pdb) newdict.keys()
  dict_keys(['pig', 'finch'])
  (Pdb) list(newdict.keys())
  *** Error in argument: '(newdict.keys())'
  </code></pre>
  
  <p>How do I get this to work in <code>pdb</code>?</p>