[Tutor] beginning to code

Mark Lawrence breamoreboy at yahoo.co.uk
Fri Sep 22 05:00:34 EDT 2017


On 22/09/2017 08:01, Bill wrote:
> Steve D'Aprano wrote:
>> On Fri, 22 Sep 2017 02:57 pm, Bill wrote:
>>
>>> I find Python to be more more
>>> like Java, with regard to "passing objects by reference".
>> Which is not a surprise, since both Python and Java use the same value 
>> passing
>> style: pass by object reference, or pass by sharing if you prefer.
>>
>> Java people don't call it that. They call it pass by value, and 
>> categorically
>> deny that it is pass by reference. (They're right about the second 
>> point.)
> 
> I figure that, internally, an address, a pointer, is being passed by 
> value to implement pass by reference.  Why do you say "they are right" 
> above? Are you saying it's not pass by reference?
> 

Please see 
http://jeffknupp.com/blog/2012/11/13/is-python-callbyvalue-or-callbyreference-neither/ 
and http://effbot.org/zone/call-by-object.htm

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

---
This email has been checked for viruses by AVG.
http://www.avg.com





More information about the Python-list mailing list