[Tutor] beginning to code

Bill BILL_NOSPAM at whoknows.net
Fri Sep 22 03:01:11 EDT 2017


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?

What really screws the terminology up is that it's not parameters that 
are being passed, it's arguments! %-)


>
> It also the exact same passing style as used by Swift, except Swift calls it
> pass by reference, and denies it is pass by value. (They're right about the
> second point.)
>
>
>




More information about the Python-list mailing list