Terry J. Reedy <tjre...@udel.edu> added the comment:

I and others completely disagree with "Technically the correct answer is 'pass 
by value',". This confuses the C implementation with the abstract semantics of 
Python. The correct answer is neither. Nothing is 'passed'.

A better form of the question would be "Does Python use call-by-value or 
call-by-reference?" The answer would still be 'neither'. Python is different 
from Fortran, C, and the other languages to which those terms apply. And 
because both are wrong, both lead to wrong expectations.

Python binds argument objects to parameter names in the function's local 
namespace. This is 'call by object', the term used by Barbara Liskov, chief 
developer of the object-based CLU language that did the same long before 
Python. I would call *that* the 'technically correct answer.

Yes, this has been very controversial on python-list.

----------
nosy: +tjreedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7867>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to