The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Python does not pass arguments by traditional call by reference. Its official FAQ says arguments are “passed by assignment”: a parameter becomes a local name for the object supplied by the caller. Reassigning that local name does not change the caller’s variable, but mutating a shared mutable object can be visible outside the function.
What Python does when you call a function
When a function is called, Python binds each parameter name to the object supplied for that argument. The parameter and the caller’s variable are separate names, even though both may refer to the same object. The Python Programming FAQ describes this as arguments being “passed by assignment.” See the Python 3.14.8 Programming FAQ.
This distinction separates a variable binding from an object’s state. Assigning a different object to the local parameter changes only that local name. Calling a method that mutates a shared object changes the object itself, so the caller can observe the change. The Python 3.13.16 data model reference describes objects and their mutability; mutability is a property of objects, not an argument-passing mode.
Rebinding a parameter versus mutating an object
These two functions receive the same list, but perform different operations:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
def rebind(value):
value = ["new"]
def mutate(value):
value.append("new")
items = ["old"]
rebind(items)
print(items) # ['old']
mutate(items)
print(items) # ['old', 'new']
Rebinding changes only the local name
At the start of rebind(items), both items and the local parameter value refer to the original list. The assignment value = ["new"] makes value refer to a newly created list. It does not redirect items, which still refers to the original list.
Mutation changes the shared list
At the start of mutate(items), value and items refer to the same list. The append method changes that list in place. Since the caller’s name still refers to that object, printing items shows the added element.
Rank #2
Why “mutable means by reference” is misleading
Python does not switch between call by value and call by reference depending on whether an argument is mutable. The same name-binding rule applies to every argument. Mutability explains what an operation can do to the object after the parameter has been bound; it does not determine how the argument is passed.
For example, a tuple is immutable as a container, but it can contain a mutable object such as a list. A function cannot replace an element of the tuple, but it may mutate the contained list, and that change can be observed through the tuple. This is another reason to distinguish the object’s state from the name that refers to it.
Some teaching materials describe Python as passing references to objects by value. SciPy lecture notes use the formulation “parameters to functions are references to objects, which are passed by value.” The wording differs, but the practical point is that a parameter is a separate name bound to an object; it is not an alias for the caller’s variable. See the SciPy lecture notes.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How to return replacement values
If a function calculates new values that the caller should use, return them and assign the result where the function is called. The Python FAQ says returning a tuple is almost always the clearest way to return multiple results:
def updated(a, b):
return "new-value", b + 1
x, y = updated(x, y)
The caller’s names are updated by the assignment on the final line, not by the function rebinding its local parameters. Mutating a passed list or dictionary can also communicate a result, but it changes shared state and can make code harder to follow when a return value would suffice.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.




