Terry J. Reedy <tjre...@udel.edu> added the comment:

On Windows, I get an indefinite hang rather than an overt crash with a crash 
box.  I believe that there was some swapping out to disk.  I got the same with 
list(itertools.count()). 

If you got a core dump or crash report, you might upload it.  

There is infinite looping in the argument collection but no infinite recursion 
(calling) here.  The latter is detected pretty quickly because of sys.recursion 
limit.  Infinite loops by themselves are not necessarily wrong.  This typing 
box is run by an infinite loop.  Change your 'use' to

def use(iter):
    for i in iter: print(i)

and there would be no problem.  So I disagree with 'should have been detected'. 
 I am only leaving this open in case you got an overt crash for this particular 
loop.  Those we try to fix.

----------
nosy: +terry.reedy
title: Calling a function with an infinite number of parameters is not detected 
and crash the interpreter instead of causing an exception -> Calling with an 
infinite number of parameters is not detected
versions: +Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41637>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to