python: problem with dictionary get method default value
<p>I'm having a new problem here .. 
CODE 1:</p>

<pre><code>try:
   urlParams += "%s=%s&amp;"%(val['name'], data.get(val['name'], serverInfo_D.get(val['name'])))
except KeyError:
   print "expected parameter not provided - "+val["name"]+" is missing"
   exit(0)
</code></pre>

<p>CODE 2:</p>

<pre><code>try:
   urlParams += "%s=%s&amp;"%(val['name'], data.get(val['name'], serverInfo_D[val['name']]))
except KeyError:
   print "expected parameter not provided - "+val["name"]+" is missing"
   exit(0)
</code></pre>

<p>see the diffrence in serverInfo_D[val['name']] &amp; serverInfo_D.get(val['name']) 
code 2 fails but code 1 works</p>

<p>the data</p>

<pre><code>serverInfo_D:{'user': 'usr', 'pass': 'pass'} 
data: {'par1': 9995, 'extraparam1': 22}
val: {'par1','user','pass','extraparam1'}
</code></pre>

<p>exception are raised for for data dict .. and all code in for loop which iterates over val</p>
