Earlier quoted context omitted.
We are actually both wrong. If they passed objects by value you'd be modifying a copy. They technically "pass by object reference" as another poster mentioned.
No sorry, you are incorrect and you can verify the correct answer on Wikipedia or any technical book on this subject. For example the Java Language Specification states in section 8.4.1 that Java is pass by value: https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html... ECMAScript's Language Specification also states in section 10.6 that it uses pass by value semantics, although it's much more formal about the…
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(d):
... d['foo'] 'bar'}
...
>>> a = {}
>>> f(a)
>>> a
{'foo': 'bar'}
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(d):
... d = {'foo': 'bar'}
...
>>> a = {}
>>> f(a)
>>> a
{}