Can Python function return multiple data?

Steven D'Aprano steve at pearwood.info
Thu Jun 4 18:37:45 EDT 2015


On Fri, 5 Jun 2015 03:30 am, Marko Rauhamaa wrote:

> Steven D'Aprano <steve at pearwood.info>:
> 
>>> On 2015-06-04, Marko Rauhamaa <marko at pacujo.net> wrote:
>>>> If it prints 1, it's pass by value. If it prints 3, it's pass by
>>>> reference.
>>
>> Wrong. Why do you [Marko] imagine that pass-by-value and
>> pass-by-reference are the only two options?
> 
> It's a classic dichotomy. The example I provided illustrates the 
> distinction between the two.

No it isn't, and no it doesn't.

Call by name, call by [object] sharing, call by copy-restore, call by need,
call by macro expansion... where do these appear in your false dichotomy?


-- 
Steven




More information about the Python-list mailing list