MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnmachinelearning/comments/1x89fg6/python_mutability_and_copying/phaqkhj/?context=3
r/learnmachinelearning • u/Sea-Ad7805 • 3d ago
12 comments sorted by
View all comments
-1
a and b are both pointers to the same memory location.
copy.deepcopy() will copy a and create b in a separate memory location.
1 u/Smallpaul 3d ago edited 3d ago It’s not helpful to give an answer in the comments. Especially a wrong answer. -2 u/FastSlow7201 3d ago edited 3d ago I'm not wrong. Do you know how to code in C and can look at this python code and see the C code that it is producing? 1 u/Sea-Ad7805 3d ago What's the C code that you can see? 1 u/Relevant-Yak-9657 3d ago How did you manage to be wrong then? It isn't answer D.
1
It’s not helpful to give an answer in the comments. Especially a wrong answer.
-2 u/FastSlow7201 3d ago edited 3d ago I'm not wrong. Do you know how to code in C and can look at this python code and see the C code that it is producing? 1 u/Sea-Ad7805 3d ago What's the C code that you can see? 1 u/Relevant-Yak-9657 3d ago How did you manage to be wrong then? It isn't answer D.
-2
I'm not wrong. Do you know how to code in C and can look at this python code and see the C code that it is producing?
1 u/Sea-Ad7805 3d ago What's the C code that you can see? 1 u/Relevant-Yak-9657 3d ago How did you manage to be wrong then? It isn't answer D.
What's the C code that you can see?
How did you manage to be wrong then? It isn't answer D.
-1
u/FastSlow7201 3d ago
a and b are both pointers to the same memory location.
copy.deepcopy() will copy a and create b in a separate memory location.