<div dir="auto"><div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><span style="font-size:large">On Oct 18, 2017 13:29, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="quoted-text">On 18 October 2017 at 19:56, Koos Zevenhoven <span dir="ltr"><<a href="mailto:k7hoven@gmail.com" target="_blank">k7hoven@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="m_183500653703616643gmail-"></span><div class="gmail_extra"><div class="gmail_quote"><span class="m_183500653703616643gmail-"><div style="font-family:monospace,monospace"></div></span><div style="font-family:monospace,monospace">I'm unable to reproduce the "uninterruptible with Ctrl-C" problem with infinite iterators. At least itertools doesn't seem to have it:</div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace"><div>>>> import itertools</div><div>>>> for i in itertools.count():</div><div>... pass</div><div>... </div></div></div></div></div></blockquote><div><br></div></div><div>That's interrupting the for loop, not the iterator. This is the test case you want for the problem Jason raised:</div><div><br></div><div> >>> "a" in itertools.count()</div><div><br></div><div>Be prepared to suspend and terminate the affected process, because Ctrl-C isn't going to help :)<br></div><div></div><div></div></div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto"><div dir="auto" style="font-family:sans-serif;font-size:13.696px">I'm writing from my phone now, cause I was dumb enough to try list(count())</div><div dir="auto" style="font-family:sans-serif;font-size:13.696px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:13.696px">But should it be fixed in list or in count?</div><font color="#888888" style="font-family:sans-serif;font-size:13.696px"><div dir="auto"><br></div><div dir="auto">-- Koos</div><div dir="auto"><br></div><div dir="auto">PS. Nick, sorry about the duplicate email.</div></font></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Cheers,</div><div>Nick.<br></div></div><div class="quoted-text"><br>-- <br><div class="m_183500653703616643gmail_signature">Nick Coghlan | <a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a> | Brisbane, Australia</div>
</div></div></div>
</blockquote></div><br></div></div></div>