Antoine Pitrou <[EMAIL PROTECTED]> added the comment: (the fix is probably trivial, it involves dividing sys.maxsize by the number of bytes of an unicode character, something like:
width = sys.getsizeof("a") - sys.getsizeof("") alloc = lambda: u"a" * (sys.maxsize // width) self.assertRaises(MemoryError, alloc) self.assertRaises(MemoryError, alloc) you can give it a try if you want ;-)) _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3601> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com