Nick Coghlan added the comment: On 10 November 2013 23:21, Marc-Andre Lemburg <rep...@bugs.python.org> wrote: > > This doesn't look right: > > diff -r 1ee45eb6aab9 Include/pyerrors.h > --- a/Include/pyerrors.h Sat Nov 09 23:15:52 2013 +0200 > +++ b/Include/pyerrors.h Sun Nov 10 22:54:04 2013 +1000 > ... > +PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause( > + const char *prefix_format, /* ASCII-encoded string */ > + ... > + );
After sending my previous reply, I realised you may have been referring to the comment. I copied that from the PyErr_Format signature. According to http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromFormat, the format string still has to be ASCII-encoded, and if that's no longer true, it's a separate bug from this one that will require a docs fix as well. > In the error messages, I'd use "codecs.encode()" and "codecs.decode()" > (ie. with parens) instead of "codecs.encode" and "codecs.decode". Forgot to reply to this part - I like it, will switch it over before committing. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17828> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com