Amaury Forgeot d'Arc added the comment: I don't like this assert either: this function is part of the public API, and should not crash the interpreter just because of a trailing \.
To test easily: import ctypes decode = ctypes.pythonapi.PyUnicodeUCS2_DecodeUnicodeEscape decode.restype = ctypes.py_object decode(b'\\1', 1, None) This should gently raise a UnicodeDecodeError IMO. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1359> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com