[issue35176] for loop range bug

Dan Armentrout report at bugs.python.org
Tue Nov 6 08:56:41 EST 2018


New submission from Dan Armentrout <dla0009 at uah.edu>:

If you run the following code:

x=[3,4,5]
a=x
for i in range(0,len(a)):
    a[i]=0

All x values are changed to equal a.

----------
components: Windows
messages: 329357
nosy: darmentr, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: for loop range bug
versions: Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35176>
_______________________________________


More information about the Python-bugs-list mailing list