<span class="Apple-style-span" style="border-collapse: collapse; "><div class="Ih2E3d" style="color: rgb(80, 0, 80); ">On Fri, Feb 29, 2008 at 11:55 AM, Fred Drake &lt;<a href="mailto:fdrake@acm.org" target="_blank" style="color: rgb(0, 0, 204); ">fdrake@acm.org</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div>They were failing for me a couple of days ago; checking now, they<br></div>still are, and test_itertools has been added to the list of failing<br>tests:<br><br>test test_itertools failed -- Traceback (most recent call last):<br>
&nbsp; File &quot;/Users/fdrake/projects/python/py3k/Lib/test/<br>test_itertools.py&quot;, line 698, in test_chain<br>&nbsp; &nbsp; self.assertRaises(TypeError, chain, N(s))<br>AssertionError: TypeError not raised by chain<br></blockquote>
<div><br></div></div><div>This looks like an easy one: line 698 of test_itertools.py should</div><div>be changed from</div><div><br></div><div><div class="Ih2E3d" style="color: rgb(80, 0, 80); "><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self.assertRaises(TypeError, chain, N(s))</div>
<div>&nbsp;</div></div></div><div>to</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self.assertRaises(TypeError, list, chain(N(s)))</div><div><br></div><div>Here N(s) is an instance of a class lacking a __next__</div><div>method;&nbsp;It looks like&nbsp;Raymond recently altered itertools.chain</div>
<div>to consume&nbsp;its arguments&nbsp;lazily, so the TypeError used to occur</div><div>as&nbsp;soon as chain(N(s)) was called, and now doesn&#39;t happen</div><div>until chain(N(s)).__next__ is first callled.</div><div><br></div><div>
Shall I check in this fix?</div><div><br></div><div>Mark</div></div></span>