On Wed, Feb 25, 2015 at 9:01 PM, Ben Finney firstname.lastname@example.org wrote:
Steven D'Aprano email@example.com writes:
On Wed, Feb 25, 2015 at 07:39:50PM +1100, Ben Finney wrote:
To its detriment: Making the interactive interpreter behave differently by default from the non-interactive interpreter should be resisted; code which behaves a certain way by default in one should behave the same way in the other, without extremely compelling justification.
The ship has sailed on that one. […]
Please note two things:
I don't claim there must be no differences, only that differences proposed today must come with compellign justification.
The fact that there are already differences doesn't justify diverging further. Whatever positive justification is offered, “they already diverge” cannot count for creating further divergence.
Agreed; the difference does need justification. Here's justification: Interactive execution places code and output right next to each other. The warning would be emitted right at the time when the corresponding code is entered.
Hmm. There are a few places where code gets pre-evaluated by the back end (eg to figure out whether a continuation prompt is needed). Should applicable SyntaxWarnings be emitted during such partial evaluation, or should they be held over until the whole block can be parsed?