On 2017-10-17 07:26, Serhiy Storchaka wrote:
17.10.17 17:06, Nick Coghlan пише:
Keep in mind we're not talking about a regular loop you can break out of with Ctrl-C here - we're talking about a tight loop inside the interpreter internals that leads to having to kill the whole host process just to get out of it. And this is the root of the issue. Just let more tight loops be interruptible with Ctrl-C, and this will fix the more general issue.
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. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown