Author vstinner
Recipients Chris.Colbert, serhiy.storchaka, vstinner
Date 2014-11-18.12:19:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1416313165.02.0.138127211085.issue22453@psf.upfronthosting.co.za>
In-reply-to
Content
PyObject_REPR.patch: the first part looks good to me. For the second part, you can use PySys_FormatStderr() which is more complex but more correct: it formats the string as Unicode and then encode it to stderr encoding. PyUnicode_FromFormatV() is probably safer to handle errors.

You may use PySys_FormatStderr() in the two functions to write context, and then call Py_FatalError with a simple message. The exact formatting doesn't matter much, these cases must never occur :-) An assertion may be enough :-p
History
Date User Action Args
2014-11-18 12:19:25vstinnersetrecipients: + vstinner, Chris.Colbert, serhiy.storchaka
2014-11-18 12:19:25vstinnersetmessageid: <1416313165.02.0.138127211085.issue22453@psf.upfronthosting.co.za>
2014-11-18 12:19:25vstinnerlinkissue22453 messages
2014-11-18 12:19:23vstinnercreate