Steven D'Aprano <st...@pearwood.info>:

> But you still find a few people here and there who have been exposed
> to Java foolishness, and will argue that Python is "pass by value,
> where the value is an implementation dependent reference to the thing
> that you thought was the value".

Why fight terminology? Definitions can't be proved right or wrong.

Anyway, I would say Python definitely is in the classic pass-by-value
camp. Here's a simple test:

   def f(x):
       x = 3

   y = 1
   f(y)
   print(y)

If it prints 1, it's pass by value. If it prints 3, it's pass by
reference.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to