- The Python Apprentice
- Robert Smallshire Austin Bingham
- 71字
- 2025-04-04 19:04:58
Argument passing semantics – pass by object-reference
Now let's look at how all this relates to function arguments and return values. When we call a function, we literally create new name bindings — those declared in the function definition — to existing objects — those passed in at the call itself. As such, it's important to really understand Python reference semantics if you want to know how your functions work.