Avram <pyt...@avram.us> added the comment:
Ah, I see, yes, the documentation is a bit inconsistent. What may make more sense for some magic methods is to call the underlying object and use the return value or raise any exception that occurs. For example: __bool__ return value is bool(mock._mock_wraps) __int__ return value is int(mock._mock_wraps) __lt__ return value is operator.lt(mock._mock_wraps, other) This would take care of several of them and provide more consistent behavior with the wrapped object. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39966> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com