This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iitkgp.ketan@gmail.com
Recipients iitkgp.ketan@gmail.com
Date 2019-03-07.10:24:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551954265.43.0.245266247678.issue36223@roundup.psfhosted.org>
In-reply-to
Content
>>> def pola(arr):
...   for i, item in enumerate(arr):
...     arr[i] = item*item
...
>>> a = [1,2,3,4]
>>> print(a,pola(a),a)
[1, 4, 9, 16] None [1, 4, 9, 16]

I would expect the print statement to execute and print the arguments sequentially from left to right. This could be an optimization trick inside the Python compiler, but still different that what would be expected. Thanks.
History
Date User Action Args
2019-03-07 10:24:25iitkgp.ketan@gmail.comsetrecipients: + iitkgp.ketan@gmail.com
2019-03-07 10:24:25iitkgp.ketan@gmail.comsetmessageid: <1551954265.43.0.245266247678.issue36223@roundup.psfhosted.org>
2019-03-07 10:24:25iitkgp.ketan@gmail.comlinkissue36223 messages
2019-03-07 10:24:25iitkgp.ketan@gmail.comcreate