There has been talk about “passing by reference” and “passing by value” in Python and a number of other programming languages. Let’s dispel a couple myths and talk about how Python passes parameters between methods.
When we call a method in a programming language, we can pass parameters to it. These normally are values that can be used within the method, and only exist inside it.
Imagine we are making a program for a veterinary clinic which deals with cats and dogs. We will therefore be storing data related to cats and dogs.
Something that unavoidably ends up coming up when learning Python is this issue of classmethods and staticmethods, especially for students coming from a Java background, where there are no classmethods.
Static and dynamic typed languages are concepts we come across when learning a new programming language. We might be left wondering “what is this?”, but really the meaning is quite simple.