Terry J. Reedy <tjre...@udel.edu> added the comment: Pending an argument against, I agree with the change. I think SyntaxError would be best. ValueError (etc) is for runtime (though this is compile during runtime).
What would you have for the error message? My first idea is "Cannot compile multiple statements as a single statement." This should be clear enough when calling compile(...'single'). It should at least give a hint in the doctest case. ---------- nosy: +terry.reedy stage: -> test needed type: -> feature request _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12705> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com