<div dir="auto"><div dir="ltr"><div><div>Hi all,<br><br></div>FWIW, I just tried the list(count()) experiment on my phone (Termux Python interpreter under Android).<br></div><div dir="auto"><br></div><div dir="auto"><div dir="auto">Python 3.6.2 (default, Sep 16 2017, 23:55:07)</div><div dir="auto">[GCC 4.2.1 Compatible Android Clang 5.0.300080 ] on linux</div><div dir="auto">Type "help", "copyright", "credits" or "license" for more information.</div><div dir="auto">>>> import itertools</div><div dir="auto">>>> list(itertools.count())</div><div dir="auto">Killed</div></div><div dir="auto"><br></div>Interestingly even the Termux app stays alive and otherwise the phone remains responsive and doesn't get hot. I am now sending this mail from that very phone.</div><div dir="ltr"><br></div><div dir="ltr">So this issue is not an issue on the world's most popular OS 😁</div><div dir="ltr"><br></div><div dir="ltr">Stephan</div><div dir="ltr"><br></div><div dir="ltr"><br><br><br><div dir="auto"><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Op 18 okt. 2017 08:46 schreef "Brendan Barnwell" <<a href="mailto:brenbarn@brenbarn.net">brenbarn@brenbarn.net</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2017-10-17 07:26, Serhiy Storchaka wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
17.10.17 17:06, Nick Coghlan пише:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>Keep in mind we're not talking about a regular loop you can break out of<br>
>with Ctrl-C here - we're talking about a tight loop inside the<br>
>interpreter internals that leads to having to kill the whole host<br>
>process just to get out of it.<br>
</blockquote>
And this is the root of the issue. Just let more tight loops be<br>
interruptible with Ctrl-C, and this will fix the more general issue.<br>
</blockquote>
<br>
        I was just thinking the same thing.  I think in general it's always bad for code to be uninterruptible with Ctrl-C.  If these infinite iterators were fixed so they could be interrupted, this containment problem would be much less painful.<br>
<br>
-- <br>
Brendan Barnwell<br>
"Do not follow where the path may lead.  Go, instead, where there is no path, and leave a trail."<br>
   --author unknown<br>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofco<wbr>nduct/</a><br>
</blockquote></div></div>