What's the address for?

Grant Edwards grant.b.edwards at gmail.com
Tue Feb 19 11:18:51 EST 2019


On 2019-02-19, Ben Finney <ben+python at benfinney.id.au> wrote:

>> On the implementation I am using, the ID changes if I do this:
>
> You are creating new objects and binding the name ‘a’ to different
> objects in succession. Those different objects will each have different
> identities.

Those object _may_ each have different identies.  Is it required that
they do?  If an assignment is done on name referring to an object with
no other references, would it be allowed that the "old" object is
destroyed and its ID reused for a new object being created by the RHS
of the assignment?

Admittedly, that would be a rather odd way to do things.  One would
expect that first the RHS is evaluated (perhaps creating a new
object), then the name is rebound.

-- 
Grant Edwards               grant.b.edwards        Yow! I wish I was a
                                  at               sex-starved manicurist
                              gmail.com            found dead in the Bronx!!



More information about the Python-list mailing list