Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
> Guido already listed them. Library functions, static and class methods, PR 24272 will work on all those cases. > 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). That's fine, the error is a suggestion (as we do in other parts of the stdlib), and the places where "self" is not used is normally rare. The old error is still there. The cases you mention are valid but I would say there are the exception and if someone is writing them they will probably still be able to make sense of the error. > The problem with missing "self" does not look so common and hard to correctly > determine as the above examples. Is true, but I think that the cases were this will raise a false positive is very rare and make the benefits of the error message appealing (at least to me). > We want to keep the interpreter so simple as possible, and the proposed > feature looks to me far the bar of compromise. This is an excellent point. THe only reason I am giving this a go is because this error message is super confusing to newcomers and educators are asking us, again and again, to include this hint as pypy is doing currently. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42978> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com