Deep copy is pedagogically and semantically the right choice for any mutable containers. You either make containers immutable or copies deep. Otherwise it's just an invitation for subtle bugs.
Regular and non-regular types are however a basic idea that transcends languages. I can write a snippet in Python too:
import copy
from some.random.module.on.pypi import foo
a = foo()
b = copy.copy(a)
assert a == b
If that assertion fails it implies the type isn't regular.https://stepanovpapers.com/DeSt98.pdf is probably the original paper. Others have over time refined and redefined the idea of a regular type.