This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aviso
Recipients Amir, Darragh Bailey, anthonypjshaw, aviso, cjw296, lisroach, mariocj89, michael.foord, pconnell, r.david.murray, rbcollins, xtreak
Date 2020-03-28.03:55:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585367716.37.0.028732170713.issue39966@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-03-28 03:55:16avisosetrecipients: + aviso, rbcollins, cjw296, r.david.murray, michael.foord, pconnell, Darragh Bailey, lisroach, anthonypjshaw, mariocj89, xtreak, Amir
2020-03-28 03:55:16avisosetmessageid: <1585367716.37.0.028732170713.issue39966@roundup.psfhosted.org>
2020-03-28 03:55:16avisolinkissue39966 messages
2020-03-28 03:55:15avisocreate