Welcome to Day 18. Today, we focus on understanding in detail what Python does behind the scenes when you pass an argument to a function.
Pass-By-Reference, Pass-By-Value, and Pass-By-Assignment
00:00 Earlier in this course, we talked about how Python creates objects, but then you can also have references to those objects. For example, the variable names we create are references to an object, and they’re separate.
00:12 The variable name and the object are not the same thing. So the question is, when you pass an argument to a function, what are you really passing? What is going from the main program into the function?
00:24 Is it the object? Is it the reference of the object? Is it just the value of the object? We’ve seen how an object has a reference and identity and the value.
00:35 Now this matters, and it’s not the same in every programming language. So you start today with a, with a brief foray into different programming languages to appreciate what happens elsewhere and to understand the different ways of passing information into a function.
00:54 And then of course, we’ll focus on the Python version.
00:57 Understanding what really happens behind the scenes, what it is that goes into a function is really important to understand edge cases and to understand more complex types of functions.
01:10 So we always discuss things on the forum, but today we may need to have more discussions on the forum to make sure all of the information from today’s topics gels together.
01:21 And then we can move on to go even deeper in functions tomorrow.
You must own this product to join the conversation.