<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">I think your proposal got a bit confused by the choice of names, and that you were proposing two things, one of which I think already exists (setdefault).</div><div class="gmail_quote"><br></div><div class="gmail_quote">So, I _think_ what you are proposing is that there be a method something like:</div><div class="gmail_quote"><br></div><div class="gmail_quote"><font face="monospace, monospace">def exclusive_add(self, key, value):</font></div><div class="gmail_quote"><font face="monospace, monospace">    if key in self:</font></div><div class="gmail_quote"><font face="monospace, monospace">        raise KeyError("the key: {} already exists in this dict".format(key))</font></div><div class="gmail_quote"><font face="monospace, monospace">    self[key] = value</font></div><div class="gmail_quote"><font face="monospace, monospace"><br></font></div><div class="gmail_quote">Which would make sense if  that is a common use case, and you make a pretty good case for that, with the analogy to UNIQUE in database tables.</div><div class="gmail_quote"><br></div><div class="gmail_quote">I will point out that  the DB case is quite different, because python dicts have a way to of spelling it that's really pretty straightforward, performant and robust.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">However, <font face="monospace, monospace">.setdefault()</font> is essentially a replacement for:</div><div class="gmail_quote"><br></div><div class="gmail_quote"><font face="monospace, monospace">if key in a_dict:</font></div><div class="gmail_quote"><font face="monospace, monospace">    value = a_dict(key)</font></div><div class="gmail_quote"><font face="monospace, monospace">else:</font></div><div class="gmail_quote"><font face="monospace, monospace">    a_dict[key] = default_value</font></div><div class="gmail_quote"><font face="monospace, monospace">    value = default_value</font></div><div class="gmail_quote"><br></div><div class="gmail_quote">or a similar try: except block:</div><div class="gmail_quote"><font face="monospace, monospace"><br></font></div><div class="gmail_quote"><font face="monospace, monospace">try: </font></div><div class="gmail_quote"><font face="monospace, monospace">    value = a_dict[key]</font></div><div class="gmail_quote"><font face="monospace, monospace">except KeyError:</font></div><div class="gmail_quote"><font face="monospace, monospace"></font><div class="gmail_quote" style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">    a_dict[key] = default_value</font></div><div class="gmail_quote" style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">    value = default_value</font></div><br></div><div class="gmail_quote">And I'm glad it's there.</div><div class="gmail_quote"><br></div><div class="gmail_quote">So - -if this is a fairly common use case, then maybe it's worth adding.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Note that this would be adding a new method to not just dict, but to the entire mapping protocol (ABC) -- so maybe a heavier lift than you're imagining.</div><div class="gmail_quote"><br></div><div class="gmail_quote">-CHB</div><div class="gmail_quote"><br></div><div class="gmail_quote">PS: making sure this is what you are suggesting:</div><div class="gmail_quote"><br></div><div class="gmail_quote">




<span></span>





<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(52,163,39);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">In [</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(46,231,33)"><b>12</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">]: <b>class</b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(60,159,242)"><b>my_dict</b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">dict</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">):</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><span class="gmail-Apple-converted-space">    </span>...: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">    </span></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><b>def</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(60,159,242)">exclusive_add</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(</span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">self</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, key, value):</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><span class="gmail-Apple-converted-space">    </span>...: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><b>if</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> key </span><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures;color:rgb(208,59,255)"><b>in</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">self</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">:</span></p>
<p class="gmail-p3" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(205,121,35);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><span class="gmail-Apple-converted-space">    </span>...: </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><b>raise</b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures;color:rgb(242,119,117)"><b>KeyError</b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">"the key: </span><span class="gmail-s8" style="font-variant-ligatures:no-common-ligatures;color:rgb(203,120,161)"><b>{}</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> already exists in this dict"</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">.format(key))</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)"><span class="gmail-Apple-converted-space">    </span>...: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">self</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">[key] = value</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(52,163,39);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">    </span>...:<span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> <span class="gmail-Apple-converted-space">       </span></span></p>
<p class="gmail-p4" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">In [</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(46,231,33)"><b>13</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">]: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">d = my_dict()</span></p>
<p class="gmail-p4" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">In [</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(46,231,33)"><b>14</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">]: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">d.exclusive_add(</span><span class="gmail-s9" style="font-variant-ligatures:no-common-ligatures;color:rgb(205,121,35)">'this'</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">5</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p4" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">In [</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(46,231,33)"><b>15</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">]: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">d.exclusive_add(</span><span class="gmail-s9" style="font-variant-ligatures:no-common-ligatures;color:rgb(205,121,35)">'that'</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">6</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p4" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">In [</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(46,231,33)"><b>16</b></span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">]: </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">d.exclusive_add(</span><span class="gmail-s9" style="font-variant-ligatures:no-common-ligatures;color:rgb(205,121,35)">'this'</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,163,39)">7</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p5" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(195,55,32);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">---------------------------------------------------------------------------</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s10" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">KeyError</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                                  </span>Traceback (most recent call last)</span></p>
<p class="gmail-p6" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><ipython-input-16-b7600f2469fb></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> in </span><span class="gmail-s11" style="font-variant-ligatures:no-common-ligatures;color:rgb(51,187,200)"><module></span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">()</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">----> 1</span><span class="gmail-s10" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)"> </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">d</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">.</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">exclusive_add</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">('this',</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s11" style="font-variant-ligatures:no-common-ligatures;color:rgb(51,187,200)">7</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">)</span></p>
<p class="gmail-p4" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p6" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><ipython-input-12-5f1c0f0709c6></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> in </span><span class="gmail-s11" style="font-variant-ligatures:no-common-ligatures;color:rgb(51,187,200)">exclusive_add</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">(self, key, value)</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)"><b><span class="gmail-Apple-converted-space">      </span>2</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> <span class="gmail-Apple-converted-space">    </span></span><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">def</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> exclusive_add</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">(</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">self</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">,</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> key</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">,</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> value</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">):</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)"><b><span class="gmail-Apple-converted-space">      </span>3</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> <span class="gmail-Apple-converted-space">        </span></span><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">if</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> key </span><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">in</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> self</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">:</span></p>
<p class="gmail-p7" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(82,48,225);background-color:rgb(255,255,255)"><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">----> 4</span><span class="gmail-s10" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)"> <span class="gmail-Apple-converted-space">            </span></span><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)">raise</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> KeyError</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">("the key: {} already exists in this dict".</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">format</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">key</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">))</span></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s13" style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)"><b><span class="gmail-Apple-converted-space">      </span>5</b></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> <span class="gmail-Apple-converted-space">        </span>self</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">[</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">key</span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">]</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s12" style="font-variant-ligatures:no-common-ligatures;color:rgb(82,48,225)">=</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> value</span></p>
<p class="gmail-p6" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><b><span class="gmail-Apple-converted-space">      </span>6</b></span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span class="gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-p4" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255);min-height:16px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s10" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">KeyError</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">: 'the key: this already exists in this dict'</span></p>


</div><div class="gmail_quote"><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>