Josh Rosenberg added the comment: You're supposed to use that code to create a file (the output file is just ""+""+""+""+""+""+""+""+""+...+"").
If you want something that won't MemoryError generating the file, this is a "memory free" version of the code to generate the file: import itertools, sys sys.stdout.writelines(itertools.repeat('""+', 2**17)) print('""') Run that code (saved as whatever file name you like) and pipe the output to mega_concat.py, then run mega_concat.py to repro. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22583> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com