ãã®ã¢ã¸ã¥ã¼ã«ã§ã¯æ±ç¨ã® (æµ ãï¼æ·±ã) ã³ãã¼æä½ãæä¾ãã¦ãã¾ãã 以ä¸ã«ã¤ã³ã¿ãã§ã¼ã¹ãã¾ã¨ãã¾ã: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y ãã®ã¢ã¸ã¥ã¼ã«åºæã®ã¨ã©ã¼ã«å¯¾ãã¦ã¯ãcopy.error ãéåºããã¾ãã æµ ã (shallow) ã³ãã¼ã¨æ·±ã (deep) ã³ãã¼ã®éããé¢ä¿ããã®ã¯ã è¤åãªãã¸ã§ã¯ã (ãªã¹ããã¯ã©ã¹ã¤ã³ã¹ã¿ã³ã¹ã®ãããªä»ã®ãªãã¸ã§ã¯ãã å«ããªãã¸ã§ã¯ã) ã ãã§ã: æµ ãã³ãã¼ (shallow copy) ã¯æ°ããªè¤åãªãã¸ã§ã¯ããä½æãã ãã®å¾ (å¯è½ãªéã) å ã®ãªãã¸ã§ã¯ãä¸ã«è¦ã¤ãã£ããªãã¸ã§ã¯ãã«å¯¾ãã åç § ãæ¿å ¥ãã¾ãã æ·±ãã³ãã¼ (deep copy) ã¯æ°ããª
{{#tags}}- {{label}}
{{/tags}}