[issue31506] Improve the error message logic for object_new & object_init

Nick Coghlan report at bugs.python.org
Mon Sep 18 09:46:22 EDT 2017


Nick Coghlan added the comment:

For this issue, I'm not proposing to make any change other than to solve the specific problem reported in the blog post: when the method itself isn't overridden, then the error message should report the name of the most derived class, not "object", to help users more readily find the likely source of their problem (a missing "__init__" method definition).

Making these custom errors consistent with Python 3's otherwise improved argument unpacking errors would be a separate issue (and I agree *that* change wouldn't qualify as being easy).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31506>
_______________________________________


More information about the Python-bugs-list mailing list