Author r.david.murray
Recipients Dima.Tisnek, michael.foord, r.david.murray
Date 2014-10-02.14:03:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412258634.35.0.49984037295.issue22541@psf.upfronthosting.co.za>
In-reply-to
Content
Oh, sorry, I missed the workarounds when I read the issue.  So your issue is you want to use a lambda rather than a full function for the side effect and it looks ugly.

I agree that given the names 'side_effect' and 'return_value' you'd think return_value would take precedence.  On the other hand, the API is what it is, and I'm not sure we can change it for backward compatibility reasons.  Option 1 is definitely not on the table, and the problem with option 2 is that it is easy to imagine a side_effect that conditionally returns mock.DEFAULT.
History
Date User Action Args
2014-10-02 14:03:54r.david.murraysetrecipients: + r.david.murray, michael.foord, Dima.Tisnek
2014-10-02 14:03:54r.david.murraysetmessageid: <1412258634.35.0.49984037295.issue22541@psf.upfronthosting.co.za>
2014-10-02 14:03:54r.david.murraylinkissue22541 messages
2014-10-02 14:03:54r.david.murraycreate