deepcopy vs simple copy The copy() will create a new location b for the same data as a. It will copy the data exactly as it is, with all references to objects. Think of a[2] contains a reference to another object as its data. copy() will just copy this reference as it is. deepcopy will resolve every reference too. Actually its not that confusing as it looked at first, but you can easily forget it when writing complex code and debugging it. I need to go back to my current code and look for such traps. Thanks to for your videos.
@BrendanMetcalfe
3 жыл бұрын
yeah shallow vs deep copy is a big topic, and can definitely lead to bugs! thanks
@xaliforniaboss357
Жыл бұрын
Great . Please make more lesson in python . The way u explain is extremely awesome .. plz keep loading videos
@TimurDE
2 жыл бұрын
Thank you!
@BrendanMetcalfe
2 жыл бұрын
You're welcome
@pakapeta7772
2 жыл бұрын
Nice and clear, great video. Thanks man.
@programsolve3053
3 жыл бұрын
Excellent👍👍 So nicely explained!! Absolutely to the point!! Your way of teaching is enthralling Sir!! I thank🌹🙏 you from the bottom of my heart💕❤ for giving this nice lesson!!
@BrendanMetcalfe
3 жыл бұрын
You're welcome
@SusanAmberBruce
3 жыл бұрын
It seems like python's core is a pointer system to quite an extent as opposed to an absolute reference. If one reassigned the variable copied from "a" after the copy has been made, then the copy "b" becomes fully independent
@xaliforniaboss357
Жыл бұрын
Could u plz provide us the link or book u using in video showing examples
Пікірлер: 10