Steven D'Aprano added the comment:

I'm not sure whether this is a bug or a feature.

In the examples you show, we have *both* an IndentationError/TabError and 
missing parentheses around print. So I'm almost inclined to say that this is 

- you get an IndentationError (or TabError);

- and the error message *also* tells you that print is missing parens.

Two errors for the price of one!

I'm not sure that I would have designed it this way from scratch, but given 
that it already exists I'm not sure that it should be "fixed".

In any case, since the error message itself is not part of the public API, I 
don't think there's any problem in changing it in a bug-fix release. So *if* we 
change this, we can change it in 3.6.

components: +Interpreter Core
nosy: +steven.daprano
type:  -> behavior
versions: +Python 3.6, Python 3.7

Python tracker <>
Python-bugs-list mailing list

Reply via email to