Open rgaiacs opened 7 years ago
The lesson does mention that this method of copying a list only works for simple lists. Much more detail than that likely dives too deeply into esoteric programming concepts not appropriate for the novice programmer audience that Software Carpentry targets. Given that the lesson calls out using list()
to copy simple lists, I expect that instructors can tailor their message to specific audiences and mention deep copies if it seems that a particular class is ready to dive that deep.
http://swcarpentry.github.io/python-novice-inflammation/03-lists/ says
But, as explained in https://stackoverflow.com/a/17873397/1802726,
list()
will not create a deep copy. Should we use the solution offered at StackOverflow?