On Mon, 27 Jan 2014 20:22:53 +0800 Vajrasky Kok <sky....@speaklikeaking.com> wrote: > > >>> from itertools import repeat > >>> list(repeat('a', 2**31)) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > MemoryError
Sure, just adjust the number to fit the available memory (here, 2**29 does the trick). Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com