learning python ...
Michael F. Stemper
mstemper at gmail.com
Tue May 25 12:38:27 EDT 2021
On 24/05/2021 23.08, hw wrote:
> On 5/25/21 12:37 AM, Greg Ewing wrote:
>> Python does have references to *objects*. All objects live on
>> the heap and are kept alive as long as there is at least one
>> reference to them.
>>
>> If you rebind a name, and it held the last reference to an
>> object, there is no way to get that object back.
>
> Are all names references? When I pass a name as a parameter to a
> function, does the object the name is referring to, when altered by the
> function, still appear altered after the function has returned? I
> wouldn't expect that ...
I just ran a quick check and java (Ack, spit) does the same thing.
--
Michael F. Stemper
Isaiah 10:1-2
More information about the Python-list
mailing list