[Python-Dev] Negative times behaviour in itertools.repeat for Python maintenance releases (2.7, 3.3 and maybe 3.4)
Armin Rigo
arigo at tunes.org
Tue Jan 28 21:35:32 CET 2014
Hi Vajrasky,
On 28 January 2014 03:05, Vajrasky Kok <sky.kok at speaklikeaking.com> wrote:
> I get your point. But strangely enough, I can still recover from
> list(repeat('a', 2**29)). It only slows down my computer. I can ^Z the
> application then kill it later. But with list(repeat('a', times=-1)),
> rebooting the machine is compulsory.
Actually you get the early OverflowError if the value doesn't fit a C
long, and any value up to sys.maxint gets past this check. Try with
2**31-1.
A bientôt,
Armin.
More information about the Python-Dev
mailing list