Rémi Lapeyre <remi.lape...@henki.fr> added the comment:

print does not execute statements, arguments are first resolved like with any 
function. Your code is equivalent to:

>>> def pola(arr):
...     for i, item in enumerate(arr):
...             arr[i] = item*item
... 
>>> a = [1,2,3,4]
>>> pola(a)
>>> print(a, None, a)
[1, 4, 9, 16] None [1, 4, 9, 16]

I would close this as not a bug.

----------
nosy: +remi.lapeyre

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to