I see your meaning for __iter__ method.;)<br><br><div class="gmail_quote">On Mon, Jan 9, 2012 at 4:57 PM, <a href="mailto:david.garvey@gmail.com">david.garvey@gmail.com</a> <span dir="ltr"><<a href="mailto:david.garvey@gmail.com">david.garvey@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Ian & Chris for the conversation...<div class="HOEnZb"><div class="h5"><br><br><br><br><div class="gmail_quote">
On Mon, Jan 9, 2012 at 4:15 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com" target="_blank">clp2@rebertia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On Mon, Jan 9, 2012 at 3:30 PM, <a href="mailto:david.garvey@gmail.com" target="_blank">david.garvey@gmail.com</a><br>


<<a href="mailto:david.garvey@gmail.com" target="_blank">david.garvey@gmail.com</a>> wrote:<br>
</div><div>> Chris,<br>
><br>
> Both a list and dict are both iterable.  I get a python dictionary object of<br>
> both iterables.;)<br>
<br>
</div>No, you get a Python object with both iterables as instance variables.<br>
Instance variables happen to be stored using a dict (which is<br>
accessible as .__dict__), but that's to some extent an implementation<br>
detail whose relevance here I fail to see. My point was that, as Ian<br>
explained, your __iter__() method, as written, is horribly broken.<br>
<div><br>
> It is nice... but I don't know if this is good form?<br>
<br>
</div>I'm confused as to why you wrote a class (particularly when its name<br>
is an *action* rather than a noun; big red flag right there!) for your<br>
task in the first place. I think you'd be best served by moving your<br>
parsing code into a function and using a<br>
<a href="http://pypi.python.org/pypi/sorteddict" target="_blank">http://pypi.python.org/pypi/sorteddict</a> , which provides the<br>
sorted-keys property you seemed to be trying to accomplish.<br>
<br>
Also, please avoid top-posting in the future. (See<br>
<a href="http://en.wikipedia.org/wiki/Posting_style" target="_blank">http://en.wikipedia.org/wiki/Posting_style</a> )<br>
<br>
Cheers,<br>
Chris<br>
<span><font color="#888888">--<br>
<a href="http://rebertia.com" target="_blank">http://rebertia.com</a><br>
</font></span></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>David Garvey<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>David Garvey<br>