'''The difference between shallow and deep copying is only relevant for
compound objects (objects that contain other objects, like lists or
class instances).
A shallow copy constructs a new compound object and then (to the
extent possible) inserts the same objects into it that the
original contains.A deep copy constructs a new compound object and then, recursively,
inserts copies into it of the objects found in the original.'''
浅复制和深复制之间的区别仅与
复合对象(包含其他对象的对象,例如列表或
类实例)。
-浅表副本会构造一个新的复合对象,然后(到
在可能的范围内)插入相同的对象
原始包含。
-深层副本会构造一个新的复合对象,然后递归地
将原始文档中找到的对象的“副本”插入其中。