# New, copy, clone or duplicate?

**URL:** <https://discourse.myhdl.org/t/new-copy-clone-or-duplicate/31>\
**Category:** Uncategorized\
**Created:** [May 19, 2016, 7:29pm UTC](https://discourse.myhdl.org/t/new-copy-clone-or-duplicate/31 "2016-05-19T19:29:21Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![josyb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/josyb/32/5_2.png) [@josyb](https://discourse.myhdl.org/u/josyb)\
**Post date:** [May 23, 2016, 7:32pm UTC](https://discourse.myhdl.org/t/new-copy-clone-or-duplicate/31/12 "2016-05-23T19:32:48Z")

</div>

Chris,  
I just found out that \_intbv.py has (almost) identical code for ` __copy__ ` and ` __deepcopy__ `. If we adopt this further `copy()` would be acceptable for the _shortcut_ method. (and would be almost identical code too). This will simplify my code for _Array()_ (and _StructType()_)

Regards,

Josy

---

_[View the full topic](https://discourse.myhdl.org/t/new-copy-clone-or-duplicate/31)._
