Nick Coghlan added the comment:

OK, after a long detour that delved deep into codeop and the vagaries of 
PyCF_DONT_IMPLY_DEDENT (due to a problem that turned out to be due to a missing 
"\n" in a test case I added), my main conclusion is:

Coupling the "single vs multiple statement" decision to the "implicit print 
after every call" decision is *really* annoying. The latter should be its own 
flag *or else* also implied by the "DONT_IMPLY_DEDENT" flag that is already 
passed to the compiler by codeop.

If *that* gets fixed, then the code module could simply switch over to 
compiling in exec mode always, without any side effects on the implicit display 
of expression results.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7741>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to