Categories

Dec 14, 2019 in Python
Q: What Is “Call By Reference” In Python?

1 Answer

Dec 14, 2019

We use both “call-by-reference” and “pass-by-reference” interchangeably. When we pass an argument by reference, then it is available as an implicit reference to the function, rather than a simple copy. In such a case, any modification to the argument will also be visible to the caller.

This scheme also has the advantage of bringing more time and space efficiency because it leaves the need for creating local copies.

On the contrary, the disadvantage could be that a variable can get changed accidentally during a function call. Hence, the programmers need to handle in the code to avoid such uncertainty.

Click here to read more about Python
Click here to read more about Insurance

Related questions

Madanswer
Dec 14, 2019 in Python
May 17, 2019 in Python
Mar 10 in C++
...