Nov-12-2018, 08:42 PM
(Nov-12-2018, 08:39 PM)CanadaGuy Wrote: Is the copy module the only way to achieve this?In practice, there are often other ways to create new instances, it all depends on the class. I noticed in my own code that I almost never use the copy module. For example in order to copy a dict D, one usually writes
new = dict(D)
.