# JuMPv0.21 and deepcopy

**URL:** <https://discourse.julialang.org/t/jumpv0-21-and-deepcopy/36051>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, deepcopy\
**Created:** [March 16, 2020, 6:03pm UTC](https://discourse.julialang.org/t/jumpv0-21-and-deepcopy/36051 "2020-03-16T18:03:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [March 17, 2020, 5:03pm UTC](https://discourse.julialang.org/t/jumpv0-21-and-deepcopy/36051/8 "2020-03-17T17:03:17Z")

</div>

The behavior of `copy` and `deepcopy` come from different code (`copy` has [a specific implementation in JuMP](https://github.com/JuliaOpt/JuMP.jl/blob/master/src/copy.jl), while `deepcopy` [defaulted to the generic type fallback](https://github.com/JuliaLang/julia/blob/2d5741174ce3e6a394010d2e470e4269ca54607f/base/deepcopy.jl#L57)), so it is entirely possible that you may have observed some difference between them; however, `deepcopy` should not really be fully working, as @Thuener suggested to make it an error exactly because they [were surprised by a silent change to the deepcopied model after changing the original model](https://discourse.julialang.org/t/strange-behavior-with-deepcopy/23342).

---

_[View the full topic](https://discourse.julialang.org/t/jumpv0-21-and-deepcopy/36051)._
