STINNER Victor added the comment: I have 12 GB of RAM. Let's test.
$ ./python Python 3.4.0a0 (default:8573a86c11b5+, Oct 31 2012, 22:17:00) [GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux >>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**32 + b'}') >>> len(x) 4294967318 >>> y=x.decode('unicode-escape') Traceback (most recent call last): File "<stdin>", line 1, in <module> MemoryError There is no crash, but it would be better to get a SyntaxError("(unicode error) 'unicodeescape' codec can't decode bytes in position 0-6: unknown Unicode character name") instead. I propose to only fix this issue in Python 3.4. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16335> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com