Laurent De Buyst added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18622>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to