A question on modification of a list via a function invocation

Chris Angelico rosuav at gmail.com
Tue Sep 5 13:28:10 EDT 2017


On Wed, Sep 6, 2017 at 3:15 AM, Ned Batchelder <ned at nedbatchelder.com> wrote:
> On 9/5/17 1:02 PM, Steve D'Aprano wrote:
>> On Tue, 5 Sep 2017 11:37 pm, Gregory Ewing wrote:
>>
>>> Dennis Lee Bieber wrote:
>>>> Pascal, probably Modula-2, Visual BASIC are closer to the C++ reference
>>>> semantics, in that the definition of a function declares how the
>>>> argument(s) are passed.
>>> Well, sort of. In Pascal and Modula, and also VB I think,
>>> parameters are the only things that can be declared as having
>>> reference semantics, whereas references in C++ are first-class
>>> things that can be stored in any variable.
>> No, they aren't first-class.
>
> Did you mis-read Gregory's claim? He said, "references *in C++* are
> first-class things".  You seem to be talking below about Python things.
>

And everything Steve said was about C++ references, which are a form
of alias. Not a 'thing'.

ChrisA



More information about the Python-list mailing list