New submission from Georg Brandl: Follow-up to #6624. This issue changed a call to seterror() whose last argument is supposed to be NULL or a "custom error message" given by the ";message" format character. This had two effects:
* the custom message (if present) is never printed * the helpful "function() argument X " is omitted and only "must be str, not int" remains >>> format(None, 1) # current behavior TypeError: must be str, not int >>> format(None, 1) # with #6624 reverted (= patch to this issue applied) TypeError: format() argument 2 must be str, not int Almost all uses of the ";" format code are currently broken: the strings must give a complete message, but only give a description of the expected arguments. Most of them should probably just be removed. ---------- components: Interpreter Core files: seterror_fix.patch keywords: patch messages: 199804 nosy: benjamin.peterson, georg.brandl, pitrou priority: normal severity: normal stage: patch review status: open title: PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32100/seterror_fix.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19253> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com