[issue36026] Different error message when sys.settrace is used

INADA Naoki report at bugs.python.org
Tue Feb 19 05:24:08 EST 2019


INADA Naoki <songofacandy at gmail.com> added the comment:

BTW, should we have different error message for class methods and instance mehtods?

* method: "descriptor 'X' for 'Y' objects doesn't apply to a 'Z' object"
* classmethod: "descriptor 'X' for 'Y' types doesn't apply to a 'Z' type"

Currently, classmethod notice about subtype, but instance method doesn't notice about subtype.
Should we notice about subtype in both error message?
Could someone write short, clear, and consistent error message?

----------

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


More information about the Python-bugs-list mailing list