Daniel Urban <urban.dani...@gmail.com> added the comment: > You could also call PyErr_NormalizeException at the beginning, and > update the fields directly in the PySyntaxErrorObject structure. No > need to deal with any tuple.
Sorry, but I don't really understand. If I call PyErr_NormalizeException at the beginning, the SyntaxError instance will be initialized with the wrong 3-tuple: (errstr, lineno, offset). If after that I update the msg, filename, ... fields, they will be correct, but I think the args field still will be the wrong 3-tuple. So I'll have to still create the new tuple, and replace the args field, right? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11441> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com