-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Report error if self has explicit type #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Actually, having a self argument with an
Since the name of self is up to the programmer, we can't just complain if the first argument is not spelled 'self'. So this might be a good compromise: give a warning if the first argument of a method has an explicit type that is not Now we can also diagnose some cases of forgetting to include
This does not strictly have to be an error. For example, consider the above example: if the function is only called as |
@JukkaL: I can do this one. |
Given the situation with #1586 I'm going to retag this as "needs discussion". |
I wonder if we could do something like this:
|
I think we can close this issue. |
Whoops! Indeed. |
For example, the following program should not be accepted:
The text was updated successfully, but these errors were encountered: