[Python-ideas] Improve error message when missing 'self' in method definition
אלעזר
elazarg at gmail.com
Wed Oct 5 15:15:08 EDT 2016
More information about the Python-ideas mailing list
Wed Oct 5 15:15:08 EDT 2016
- Previous message (by thread): [Python-ideas] Improve error message when missing 'self' in method definition
- Next message (by thread): [Python-ideas] Improve error message when missing 'self' in method definition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Isn't it possible to implement it as a pure Python exception hook? On Wed, Oct 5, 2016 at 10:04 PM Ivan Levkivskyi <levkivskyi at gmail.com> wrote: > > On 5 October 2016 at 20:55, Yury Selivanov <yselivanov.ml at gmail.com> > wrote: > > > 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. > > > It would help if you could create an issue and write exhaustive unittests > (or at least specifying how exactly the patch should work for all corner > cases). Someone with the knowledge of CPython internals will later add the > missing C code to the patch. > > Yury > > > I agree with Yury here. There are corner cases (like what to do with > classmethods etc). If behaviour for all of them are specified, it would be > quite straightforward to implement this. > > -- > Ivan > > _______________________________________________ > 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/e3650f3f/attachment.html>
- Previous message (by thread): [Python-ideas] Improve error message when missing 'self' in method definition
- Next message (by thread): [Python-ideas] Improve error message when missing 'self' in method definition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list