Author ncoghlan
Recipients alex, glyph, gvanrossum, ncoghlan
Date 2014-06-05.15:07:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401980839.06.0.736211179057.issue21669@psf.upfronthosting.co.za>
In-reply-to
Content
I realised my experiment with supporting implicit calls could potentially be used as the basis for a patch that reported more specific error details when "print" and "exec" were used as statements, so I went ahead and updated it to do so.

The initial patch has a failure in test_source_encoding - this appears to be a general issue with moving syntax errors from the parser (which reliably sets the "text" attribute on the raised SyntaxError) to the AST compiler (which sets that to None when running from a string compiled directly from memory rather than from a file on disk).

I've also only flagged this as a patch for 3.5 - I can't think of a way to do it without changing the language grammar to allow the error to be generated in a later stage of the compilation process, and that's not the kind of thing we want to be doing in a maintenance release.
History
Date User Action Args
2014-06-05 15:07:21ncoghlansetrecipients: + ncoghlan, gvanrossum, glyph, alex
2014-06-05 15:07:19ncoghlansetmessageid: <1401980839.06.0.736211179057.issue21669@psf.upfronthosting.co.za>
2014-06-05 15:07:19ncoghlanlinkissue21669 messages
2014-06-05 15:07:18ncoghlancreate