<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-family: Helvetica, sans-serif; "><a href="http://bai.local:8081/x/addFour#" class="switch_source" tbid="48887488" style="color: rgb(0, 153, 0); text-decoration: none; ">&nbsp;&nbsp; &nbsp;</a></span></div><span class="Apple-style-span" style="font-family: Helvetica, sans-serif; "><code class="source" source-type="short" style="color: rgb(0, 0, 102); "><a class="switch_source" href="http://bai.local:8081/x/addFour#" style="color: rgb(0, 153, 0); text-decoration: none; ">&gt;&gt;&nbsp;&nbsp;</a><font color="#0000AF"><b>if</b></font>&nbsp;<font color="#333333">value</font>&nbsp;<font color="#0000AF"><b>not</b></font>&nbsp;<font color="#0000AF"><b>in</b></font>&nbsp;<font color="#333333">vocabulary</font><b>:</b></code><br><b>TypeError: argument of type 'function' is not iterable&nbsp;</b></span><div><br></div><div>(full traceback is also attached)</div><div><br></div><div>The interesting thing to note is that in the 4th test, the object 'value' has an attribute vocabulary which is set to the source function, whereas I have noted when using pdb this is usually a list of simpleterms (ie, the result of the called function).</div><div><br></div><div>Please let me know if I'm using the source incorrectly, I've had a frustrating two days trying to get through this.</div><div><br></div><div>Any help is much appreciated.</div><div><br></div><div>Regards,</div><div>Adam</div><div><br></div></body></html>