[issue21984] list(itertools.repeat(1)) causes the system to hang

2014-07-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Library (Lib) -Extension Modules stage: -> resolved ___ Python tracker ___ ___ Python-bugs-

[issue21984] list(itertools.repeat(1)) causes the system to hang

2014-07-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Python has no mechanism for identifying the difference > between an infinitely long generator and a long but finite generator. > Eventually, if you left the code running, it should eventually > exhaust physical memory and the page file, then die with a Memo

[issue21984] list(itertools.repeat(1)) causes the system to hang

2014-07-14 Thread Josh Rosenberg
Josh Rosenberg added the comment: It's unlikely to have hung the system entirely. It will slow down a lot though, as it will consume ridiculous amounts of RAM, and occasionally involve copying the existing data due to reallocation. The cost of performing this pointless work may consume enough

[issue21984] list(itertools.repeat(1)) causes the system to hang

2014-07-14 Thread James Paget
New submission from James Paget: In Python 3.4, type: >>> import itertools >>> list(itertools.repeat(1)) The system will hang, and a cold reboot is necessary (at least on Windows). I expected some sort of "infinite list" exception to be thrown. -- components: Extension Modules messag