No, this is not a duplicate.
I have the following classes:
When Player is instantiated, it creates a new board object for that player.
I have a function which switches the current and latent players:
from copy import deepcopy
temp_val = deepcopy(self.current_player)
# self.current_player = None
self.current_player = deepcopy(self.latent_player)
# self.latent_player = None
self.latent_player = deepcopy(temp_val)
temp_val = None
It works so, because name is string, board is class instance which will be copied, but it is one level deeper, so it will not be copied with deepcopy. Deepcopy is not meant recursively.