<div dir="ltr">Since we are talking about namedtuple and implementation, I just noticed:<div><br><font face="monospace, monospace">In [22]: Point = namedtuple('Point', ['x', 'y'])</font><br><font face="monospace, monospace">In [23]: p = Point(2,3)</font><br><br><font face="monospace, monospace">In [24]: p.x = 5</font><br><font face="monospace, monospace">---------------------------------------------------------------------------</font><br><font face="monospace, monospace">AttributeError                            Traceback (most recent call last)</font><br><font face="monospace, monospace"><ipython-input-24-328d3fab3e30> in <module>()</font><br><font face="monospace, monospace">----> 1 p.x = 5</font><br><font face="monospace, monospace">AttributeError: can't set attribute</font><br><br>OK -- that makes sense. but then, if you try:<br><br><font face="monospace, monospace">In [25]: p.z = 5</font><br><font face="monospace, monospace">---------------------------------------------------------------------------</font><br><font face="monospace, monospace">AttributeError                            Traceback (most recent call last)</font><br><font face="monospace, monospace"><ipython-input-25-625ed954d865> in <module>()</font><br><font face="monospace, monospace">----> 1 p.z = 5</font><br><font face="monospace, monospace">AttributeError: 'Point' object has no attribute 'z'</font><div><br></div><div>I think this should be a different message -- key here is that you can't set a new attribute, not that one doesn't exist. Maybe:</div><div><br></div><div><span style="font-family:monospace,monospace">"AttributeError: can't set new attribute"</span><br></div><div><br></div><div>-CHB</div><div><br></div><div>-- <br></div><div><div class="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></div>