On Mon, Jan 28, 2002 at 09:48:32PM -0800, David Ascher wrote: > I'm still quite puzzled by the "unlinking .ptlc" problem when dealing > with SyntaxErrors. Is the 'os.unlink()' call in ptl_import really > necessary? I'm pretty sure it's necessary. As the comment says, if it wasn't there a corrupt .ptlc file could be left lying around. > Also, the ptl_compile code about SyntaxError is iffy -- SyntaxError is > never imported into that module, but referenced. SyntaxError is in __builtin__. > Finally -- even with my patch, SyntaxErrors yield goofy tracebacks and > not the useful real SyntaxError traceback referring to the faulty code. > Any ideas welcome. It's probably a symptom of the compile() builtin not raising a proper SyntaxError exception. See the hacky code in ptl_compile.parse. I mean to fix this in the interpreter but haven't got around to it yet. Neil