Deep Copy (深複製) / Shallow Copy (淺複製)

  • Shallow copy:
    To construct a new compound object and then (to the extent possible) insert references into it to the objects found in the original.
  • Deep copy:
    To construct a new compound object and then, recursively, insert copies into it of the objects found in the original.

 

Ref

  1. Python Docs: Copy
  2. WIKIPEDIA: Object Copying

Last Updated on 2025/01/07 by A1go

目錄

目錄
Bitnami