[issue31506] Improve the error message logic for object_new & object_init
Nick Coghlan
report at bugs.python.org
Mon Sep 18 08:19:40 EDT 2017
Nick Coghlan added the comment:
Fortunately, the logic is already well encapsulated: there's a "if (excess_args && (case A || case B)) {... report error ...}" check at the start of each of object_new and object_init, where "case A" = "the other function in the object_new/object_init pair has *not* been overriden" and "case B" is "this function *has* been overridden".
That means the only change needed is to include the type name in an updated error message in case A, while retaining the current error messages for case B.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31506>
_______________________________________
More information about the Python-bugs-list
mailing list