[issue42978] Improve error message when "self" is missing from the method definition
Pablo Galindo Salgado
report at bugs.python.org
Wed Jan 20 16:00:35 EST 2021
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
> Do you also exclude class and static methods?
Yup, there is a test in the PR for that IIRC
>I still worry that this might confuse users when a library for some reason uses a different name than 'self'.
That's a good point but I think it should be fine because the old error is still there and the new part is formulated as a question (did you forgot ...?). 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.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42978>
_______________________________________
More information about the Python-bugs-list
mailing list