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 Laurent.De.Buyst
Recipients Laurent.De.Buyst, michael.foord, nicola.palumbo
Date 2014-01-14.12:56:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389704208.9.0.558617591712.issue18622@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry Michael, I should have read your second comment more closely since you already pointed out that using a list as default argument is bad.

It is, however, easily fixed by changing to this:

def reset_mock(self, visited=None):
    "Restore the mock object to its initial state."
    if visited is None:
        visited = []
    if id(self) in visited:
        return
History
Date User Action Args
2014-01-14 12:56:48Laurent.De.Buystsetrecipients: + Laurent.De.Buyst, michael.foord, nicola.palumbo
2014-01-14 12:56:48Laurent.De.Buystsetmessageid: <1389704208.9.0.558617591712.issue18622@psf.upfronthosting.co.za>
2014-01-14 12:56:48Laurent.De.Buystlinkissue18622 messages
2014-01-14 12:56:48Laurent.De.Buystcreate