<br><br><div><span class="gmail_quote">2007/7/13, Raymond Hettinger &lt;<a href="mailto:python@rcn.com">python@rcn.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>[Matthieu on itertools.dropwhile() docs]<br>&gt; Make an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every element. Note,<br>&gt; the iterator does not produce any output until the predicate is true, so it may have a lengthy start-up time.
<br>&gt;<br>&gt; It says something and then the opposite, so which one is true ?<br><br>It is correct as written.&nbsp;&nbsp;Given a sequence where predicate is true 1000 times and then alternately false and true, it returns the<br>
part that is alternately false and true.&nbsp;&nbsp;So, it did DROP (omit, not return, skip-over, etc) the first 1000 true items and it did<br>return EVERY element from the first false to the end.&nbsp;&nbsp;It did not produce any output for the first 1000 inputs so it took a while to
<br>get to the first output (the first false).&nbsp;&nbsp;Hope that clears it up for you.</blockquote></div><br>Hi,<br><br>Thanks for the answer.<br>I agree with you, but this explains the first sentence. The second says that nothing is output until the predicate is true. It should say&quot; while the predicate is true&quot; or &quot;until the predicate is false&quot;. But I could be misunderstand &#39;until&#39; as well (English is not my mother tongue, but still...)
<br><br><br>Matthieu