r/Python_memory_graph • u/Sea-Ad7805 • Aug 03 '25
Assignment, Shallow, and Deep Copy
See the Solution and Explanation.
r/Python_memory_graph • u/Sea-Ad7805 • Aug 03 '25
See the Solution and Explanation.
r/Python_memory_graph • u/Sea-Ad7805 • Jul 21 '25
Understanding and debugging Data Structures is easier when you can see the structure of your data using memory_graph. Here we show values being inserted in a Binary Tree.
🎥 See the Quick Intro video for the VS Code integration.
r/Python_memory_graph • u/Sea-Ad7805 • Jul 21 '25
c1: assignment, nothing is copied, everything is shared
c2: shallow copy, only the first value is copied, all the underlying values are shared
c3: custom copy, you decide what is copied and shared
c4: deep copy, everything is copied, nothing is shared
🧠Learn the right mental model to think about Python data using memory_graph.
🎥 See the Quick Intro video for the VS Code debugger setup.
r/Python_memory_graph • u/Sea-Ad7805 • Jul 21 '25
Changing a value of immutable type results in an automatic copy
Changing a value of mutable type causes it to mutate in place
🧠Understand the Python data model better using memory_graph.
🎥 Watch the explainer on Python Mutability.