Am 15.08.2017 um 20:47 schrieb Larry Hudson:
[snip]
===============  test2() code  ==============
def test2(alist):           ss ─┬─> [1, 2, 3]
                          alist ─┘
---------------------------------------------
     <assignment>           ss ─┬─> [3, 6, 9]
                         alist ─┘
---------------------------------------------
     alist = [30, 60, 90]    ss ───> [3, 6, 9]
                          alist ───> [30, 60, 90]
[snip]

The above shows that with <assignment>, i.e. assigning single values to
individual members of alist (with alist[0]=3 etc.) is "principally"
different from assigning a whole list to alist (with alist=[30,60,90]).
The first operation doesn't affect the connection between ss and alist,
while the second separates the connection between ss and alist, as your
diagram above clearly indicates.

Isn't this kind of convention/rule something that appears to be not
quite natural/"logical" to the common users (non-experts)?

M. K. Shen


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to