This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients brian.curtin, ezio.melotti, georg.brandl, michael.foord, r.david.murray, terry.reedy
Date 2010-07-10.23:23:42
SpamBayes Score 0.02258305
Marked as misclassified No
Message-id <1278804223.9.0.83462681968.issue7867@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-07-10 23:23:43terry.reedysetrecipients: + terry.reedy, georg.brandl, ezio.melotti, r.david.murray, michael.foord, brian.curtin
2010-07-10 23:23:43terry.reedysetmessageid: <1278804223.9.0.83462681968.issue7867@psf.upfronthosting.co.za>
2010-07-10 23:23:42terry.reedylinkissue7867 messages
2010-07-10 23:23:42terry.reedycreate