<div dir="ltr">This statement is giving me the following error<div><br></div><div>Statement:<br><div>for p, k, j in zip(sorted(segments.iterkeys(), class_count.iterkeys(), pixel_count.iterkeys())):<br></div></div><div><br>
</div><div style>Error: </div><div style><div>Traceback (most recent call last):</div><div>  File "C:\Users\inshu\Desktop\Training_segs_trial2.py", line 170, in <module></div><div>    access_segments(segimage, data)</div>
<div>  File "C:\Users\inshu\Desktop\Training_segs_trial2.py", line 147, in access_segments</div><div>    for p, k, j in zip(sorted(segments.iterkeys(), class_count.iterkeys(), pixel_count.iterkeys())):</div><div>
TypeError: 'dictionary-keyiterator' object is not callable</div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 23, 2013 at 12:33 PM, inshu chauhan <span dir="ltr"><<a href="mailto:insideshoes@gmail.com" target="_blank">insideshoes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">zip isn't doing the required </div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Tue, Apr 23, 2013 at 12:28 PM, inshu chauhan <span dir="ltr"><<a href="mailto:insideshoes@gmail.com" target="_blank">insideshoes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes Simultaneously means all three running at the same time, I looked up zip just now, but will it not disturb my dictionaries ? <div>

And yes the dictionaries have same number of keys. </div><div>
<br></div><div>thanks </div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 23, 2013 at 12:16 PM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On Tue, Apr 23, 2013 at 4:40 PM, inshu chauhan <<a href="mailto:insideshoes@gmail.com" target="_blank">insideshoes@gmail.com</a>> wrote:<br>



> i have to implement the below line in one of my code:<br>
><br>
> for  p in sorted(segments.iterkeys()) and for k in<br>
> sorted(class_count.iterkeys()) and for j in sorted(pixel_count.iterkeys()):<br>
><br>
> Its giving me a syntax error which is obvious, but how can I make all three<br>
> for loop run simultaneously or any other way to do this simultaneous work<br>
> ???<br>
<br>
</div></div>Define simultaneously. Do the three dictionaries have the same number<br>
of keys? If so, look up zip() or itertools.izip; if not, you may have<br>
to more clearly define "simultaneous".<br>
<br>
ChrisA<br>
<span><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>