Shallow Copy and Deep Copy in Python 3

Shallow Copy and Deep Copy in Python 3

Stack Equation

4 года назад

2,176 Просмотров

The copying process occurs recursively in a deep copy. A new collection is first created, then it gets recursively populated with copies of child objects found in the original.

Shallow copying is not recursive unlike deep copy, a new collection object is constructed and it's populated with references to the child objects found in the original, however, these are only references, not the actual copies itself.

Тэги:

#Python_3 #Shallow_Copy #Deep_Copy #Reference #Object
Ссылки и html тэги не поддерживаются


Комментарии:

Renjith G Nair
Renjith G Nair - 27.01.2021 05:57

please , if you don't know or not clear, then dont try to explain. True; u need to get video hits, but not at the cost of misleading people. What you explain is half stuff. From your explanation shallow copy and list assignment are same.

Ответить
Sulekh Kulatunga
Sulekh Kulatunga - 27.05.2020 12:17

Good tutorial, but holy fuck please treat your keys with some love. Even through the microphone I could hear the key smash.

Ответить
nh nahid
nh nahid - 26.11.2019 15:57

Thank you so much

Ответить