[Python-ideas] Improve error message when missing 'self' in method definition
Nathan Goldbaum
nathan12343 at gmail.com
Wed Oct 5 14:50:44 EDT 2016
On Wed, Oct 5, 2016 at 1:27 PM, Michel Desmoulin <desmoulinmichel at gmail.com>
wrote:
> +1. Python does need better error messages. This and the recent new import
> exception will really help.
>
> Will feature freeze prevent this to get into 3.6 if some champion it?
>
Speaking of, I'm not much of a C hacker, and messing with CPython internals
is a little daunting. If anyone wants to take this on, you have my
blessing. I also may take a shot at implementing this idea in the next
couple weeks when I have some time.
>
> I also really like https://github.com/SylvainDe/DidYouMean-Python and as
> a trainer, will use it in my next training sessions.
>
> Le 05/10/2016 à 20:09, Stephan Houben a écrit :
>
>> +∞
>>
>> Another long-time user here who occasionally still makes this mistake.
>>
>> Stephan
>>
>> 2016-10-05 19:29 GMT+02:00 Paul Moore <p.f.moore at gmail.com
>> <mailto:p.f.moore at gmail.com>>:
>>
>> On 5 October 2016 at 18:17, Lisa Roach <lisaroach14 at gmail.com
>> <mailto:lisaroach14 at gmail.com>> wrote:
>> > +1
>> >
>> > I've definitely seen a lot of new users make this error, an
>> improved message
>> > could go a long way.
>>
>> I'm not a new user by any means, and I still regularly make this
>> mistake. Because I've got the experience, I recognise the error when I
>> see it, but that's not much help for people who haven't already made
>> the mistake hundreds of times :-)
>>
>> +1 on improving the message.
>> Paul
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org <mailto:Python-ideas at python.org>
>> https://mail.python.org/mailman/listinfo/python-ideas
>> <https://mail.python.org/mailman/listinfo/python-ideas>
>> Code of Conduct: http://python.org/psf/codeofconduct/
>> <http://python.org/psf/codeofconduct/>
>>
>>
>>
>>
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161005/ae818945/attachment.html>
More information about the Python-ideas
mailing list