<div dir="ltr">+1 <div><br></div><div>I've definitely seen a lot of new users make this error, an improved message could go a long way.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 1:52 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>Recently pypy received a patch that improves the error message one gets when 'self' is missing in a method's signature:</div><div><br></div><div><a href="https://mail.python.org/pipermail/pypy-dev/2016-September/014678.html" target="_blank">https://mail.python.org/<wbr>pipermail/pypy-dev/2016-<wbr>September/014678.html</a><br></div><div><br></div><div>Here are the commits that implement the change in pypy:</div><div><br></div><div><a href="https://bitbucket.org/pypy/pypy/commits/all?search=branch(better-error-missing-self)" target="_blank">https://bitbucket.org/pypy/<wbr>pypy/commits/all?search=<wbr>branch(better-error-missing-<wbr>self)</a><br></div><div><br></div><div>I'm curious whether a similar improvement would also be received well in CPython. In particular, this guides one to the correct solution for a common programming mistake made by newcomers (and even not-so-newcomers).</div><div><br></div><div>Here is a case study that found this was a common source of errors for newcomers:</div><div><br></div><div><a href="http://dl.acm.org/citation.cfm?id=2960327" target="_blank">http://dl.acm.org/citation.<wbr>cfm?id=2960327</a><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Nathan</div></font></span></div>
<br>______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br></blockquote></div><br></div>