This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, vstinner
Date 2008-10-08.00:07:32
SpamBayes Score 1.97018e-07
Marked as misclassified No
Message-id <>
One last thing: there is a path where lineobj is not freed (when PyUnicode_Check(lineobj) is false); I suggest to move 
Py_XDECREF(lineobj) just before the final return statement.
Reference counting is fun ;-)

> Should I stop on the first error instead of using PyErr_Clear()?
> I would like to display the traceback even if an function failed.
You are right. Common failures should clear the error and return 0.
In your patch, there is one remaining place, the call to PyFile_GetLine().

More fun will arise when my Windows terminal (encoding=cp1252) will try 
to display Chinese characters. Let's pretend this is yet another issue.
Date User Action Args
2008-10-08 00:07:41amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, vstinner
2008-10-08 00:07:36amaury.forgeotdarcsetmessageid: <>
2008-10-08 00:07:35amaury.forgeotdarclinkissue3975 messages
2008-10-08 00:07:32amaury.forgeotdarccreate