Assume I have an instance foo of some class Class with some variable foo.x. Now I want to produce a copy of foo:
bar = foo
when I now change bar.x, this also changes foo.x. How can I get a copy of foo, where I can change everything without changing the original foo? Creating a new instance of Class is not an option, because I need it in the state in which foo already is.
You need to use the module copy.