[Python-Dev] Negative times behaviour in itertools.repeat for Python maintenance releases (2.7, 3.3 and maybe 3.4) (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Mon Jan 27 13:29:18 CET 2014


On Mon, 27 Jan 2014 20:22:53 +0800 Vajrasky Kok <sky.kok at speaklikeaking.com> wrote:

>>> from itertools import repeat >>> list(repeat('a', 2**31)) Traceback (most recent call last): File "", line 1, in MemoryError

Sure, just adjust the number to fit the available memory (here, 2**29 does the trick).

Regards

Antoine.



More information about the Python-Dev mailing list