A question on modification of a list via a function invocation

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Sep 8 03:58:56 EDT 2017


Rustom Mody wrote:

> I'd like to know what these rules are

I can't give you a complete list of them off the top of my
head, but some examples of the kind of rules I have in
mind are:

* After the assigment

    a = b

a and b refer to the same object.

* After

    x = [e1, e2, e3, ...]

x refers to a new object that's not the same as any
other object.

-- 
Greg



More information about the Python-list mailing list