问题 This question already has answers here : How to override the copy/deepcopy operations for a Python object? (7 answers) Closed 2 years ago . I have object which has it's own content (i.e. list of something) and a reference to another object, with which it is linked. How can I exclude the reference to the other object from being deep-copied? from copy import deepcopy class Foo: def __init__(self, content, linked_to): self.content = content self.linked_to = linked_to a1 = Foo([[1,2],[3,4]], None