This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients gvanrossum, pablogsal, serhiy.storchaka
Date 2021-01-20.22:34:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611182091.47.0.547507102296.issue42978@roundup.psfhosted.org>
In-reply-to
Content
> Could you list some cases where this will give the wrong advice?

Guido already listed them. Library functions, static and class methods, and names like slf and _self (used either in local classes and wrapper functions to avoid conflict with the self parameter of the outer method or as a poor positional-only parameter).

> We have other errors where we are not completely sure and we formulate the suggestion as a question. Some examples are the new error for incomplete imports and some missing coma errors.

There were reasons for adding that suggestions. An error with partial recursive import is pretty common, but the error message did not have any clue about the prevalent cause of error.

The problem with missing comma in a sequence is that since the code is always multiline, the traceback never contains enough information about the problem. And we are sure that the only case when the suggestion is wrong is when you intentionally wrote incorrect code.

The problem with missing "self" does not look so common and hard to correctly determine as the above examples. We want to keep the interpreter so simple as possible, and the proposed feature looks to me far the bar of compromise.
History
Date User Action Args
2021-01-20 22:34:51serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, pablogsal
2021-01-20 22:34:51serhiy.storchakasetmessageid: <1611182091.47.0.547507102296.issue42978@roundup.psfhosted.org>
2021-01-20 22:34:51serhiy.storchakalinkissue42978 messages
2021-01-20 22:34:51serhiy.storchakacreate