While shared reference saves memory space and improves program performance, there are dangers and pitfalls related to this creature feature. I will provide clear and concise examples of shared reference to highlight its behavior.
Python has a deceptively easy syntax with many built-in features that automate operations not found in other programming languages. These features enable the programmer to perform many complex operations with just a few lines of code. This simplicity can easily foster a certain amount of “programmer’s forgetfulness” about Python’s implicit use of shared reference. Therefore, we will learn how to recognize when shared reference becomes relevant. Finally, we will learn good programming practices designed to prevent issues with shared reference in code development.