Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Looks this is due to the method calls optimization (issue26110). We now avoid to create a temporary bound method, and an error with different message is raised on this path. >>> set.add(0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: descriptor 'add' requires a 'set' object but received a 'int' >>> set.add.__get__(0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: descriptor 'add' for 'set' objects doesn't apply to 'int' object ---------- nosy: +inada.naoki, yselivanov _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36026> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com