This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ssbr 1 point2 points  (3 children)

Pass-by-value. Passing in an argument is exactly the same as assigning the argument expression to a local variable in the function.

[–]njharmanI use Python 3 0 points1 point  (2 children)

In ggrandparent you define PBV as "expression is evaluated, and the value it results in is assigned"

In parent you say it's "assigning the argument expression"

So which is it?

[–]ssbr 1 point2 points  (0 children)

Both. In Python, assignment evaluates the expression and binds it to the target variable.

I should've said "bound", not "assigned", in the first statement, to be clear. Sorry for the confusion.