Running simultaneuos "FOR" loops

Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Tue Apr 23 03:38:55 EDT 2013


Am 23.04.2013 09:13, schrieb inshu chauhan:
> This statement is giving me the following error
>
> Statement:
> for p, k, j in zip(sorted(segments.iterkeys(), class_count.iterkeys(),
> pixel_count.iterkeys())):
>
> Error:
> Traceback (most recent call last):
>    File "C:\Users\inshu\Desktop\Training_segs_trial2.py", line 170, in
> <module>
>      access_segments(segimage, data)
>    File "C:\Users\inshu\Desktop\Training_segs_trial2.py", line 147, in
> access_segments
>      for p, k, j in zip(sorted(segments.iterkeys(), class_count.iterkeys(),
> pixel_count.iterkeys())):
> TypeError: 'dictionary-keyiterator' object is not callable

Which of the statements on that line causes the error? I guess asking 
yourself that question will lead you to the answer already! ;)

Any reason you quoted your own and several others' messages, am I 
missing some reference there?

Good luck!

Uli




More information about the Python-list mailing list