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 Jim Jeon
Recipients Jim Jeon, cjw296, lisroach, mariocj89, michael.foord, veky, xtreak
Date 2019-10-04.02:02:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1570154520.98.0.545459767686.issue38346@roundup.psfhosted.org>
In-reply-to
Content
Thank you all for the kind answers.
I didn't know copying could cause so many problems.

@veky
Thank you for the example.
But it seems that the example will actually raise and I think it should.
I am talking f.assert_called_with(b) when `b` has same values of `a` before it is mutated. I thought the function's purpose is to check values of the exact moment the function is called.

@xtreak
Thanks for the related issue. I didn't consider `identity comparison` situations. Definitely that could cause problems.

@mariocj89
> copy does not fully capture "the value of the object when it was passed" for custom types.
Thank you for the kind answer, it was really helpful to me. Now I understand why copying is so dangerous.
History
Date User Action Args
2019-10-04 02:02:01Jim Jeonsetrecipients: + Jim Jeon, cjw296, michael.foord, veky, lisroach, mariocj89, xtreak
2019-10-04 02:02:00Jim Jeonsetmessageid: <1570154520.98.0.545459767686.issue38346@roundup.psfhosted.org>
2019-10-04 02:02:00Jim Jeonlinkissue38346 messages
2019-10-04 02:02:00Jim Jeoncreate