I have doubts about this Standford University paper (I recommend it, I found it on the Internet), but a question arose about this code:
# parameters are passed via binding
def main():
original = [1, 2, 3]
do_your_thing(original)
print('original', original)
# when this function is called, the param_name in do_your_thing
# is "bound" to the same value as original.
def do_your_thing(param_name):
# param_name = variable - is this understading correct?
print(param_name)`
Can I imagine that behind the scenes something like
param_name = original
happens?In case my understanding is correct, the same would happen if the
original
variable were an immutable object, i.e., for example 9800?
These 2 questions are just to try to understand the passing of parameters in functions, I don't want to do something concrete.