Aaron Brady wrote:

Tell me, what happens during a call to the following C++ function?

void f( std::vector< int > x );

The same thing as would happen if you wrote

  std::vector<int> x = actual_parameter_expression;

what happens during a call to the following Python
function?

def f( x ): ...

The same thing as would happen if you wrote

  x = actual_parameter_expression

If not, which one is call-by-value?

They're both call-by-value, because they're both equivalent to
assignment according to the rules of the language concerned.

Whether they're "the same" depends on what you mean by "same".
If you define "same" in such a way that they're not, then that
definition of "same" is irrelevant to the matter at hand.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to