Python's Argument-Passing Model

Select all that apply. Which of the following statements about how Python passes arguments to functions are true?

  1. A parameter name is bound to the exact object the caller passed in, not to a copy of its value, which is why calling lst.append(x) on a parameter is visible to the caller.
  2. Reassigning a parameter inside a function (param = new_value) changes what the caller's variable refers to, because Python passes arguments by reference the way C++ does with &.
  3. A parameter listed before a bare / in a function signature can only be supplied positionally at the call site.
  4. A parameter listed after a bare * in a function signature can still be supplied positionally if the caller provides enough positional arguments.
A

A parameter listed after a bare * in a function signature can still be supplied positionally if the caller provides enough positional arguments.

B

A parameter name is bound to the exact object the caller passed in, not to a copy of its value, which is why calling lst.append(x) on a parameter is visible to the caller.

C

Reassigning a parameter inside a function (param = new_value) changes what the caller's variable refers to, because Python passes arguments by reference the way C++ does with &.

D

A parameter listed before a bare / in a function signature can only be supplied positionally at the call site.