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 Zach kuunka
Recipients Zach kuunka
Date 2019-11-15.07:06:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1573801617.55.0.5716631107.issue38808@roundup.psfhosted.org>
In-reply-to
Content
I haven't used this bug reporting thing before so sorry if I mess something up.

Anyway i'm not sure exactly what is causing the issue but the issue appears when you have a for loop looping through an array and you make a variable and set it to that array and append something to it. If you do the same thing with numbers it works as expected but if you do it with an array it for some reason doesn't get reset every iteration. Run this and you'll see what i'm talking about.

Arr = [1,2,3,4,5]
for num in Arr:
    Arr2 = Arr
    Arr2.append(1) #the 1 can be anything
    print(Arr2)

Also i'm interested to know why this happens, Thank You
History
Date User Action Args
2019-11-15 07:06:57Zach kuunkasetrecipients: + Zach kuunka
2019-11-15 07:06:57Zach kuunkasetmessageid: <1573801617.55.0.5716631107.issue38808@roundup.psfhosted.org>
2019-11-15 07:06:57Zach kuunkalinkissue38808 messages
2019-11-15 07:06:57Zach kuunkacreate