Yandle
Yandle

Reputation: 411

Are shallow and deep copy identical for mutable objects containing immutable values?

From reading this answer it seems that for Python dictionaries and lists where values are mutable objects, shallow and deep copy work differently. However, if the Python dictionary or list is simply one where the values are immutable (i.e. string, integer etc.), are shallow and deep copy equivalent?

Upvotes: 0

Views: 47

Answers (0)

Related Questions