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 saeed
Recipients ezio.melotti, saeed
Date 2016-11-03.07:23:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478157798.51.0.0317356859068.issue28594@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,
I define multi List in a line such as this:
    smoke= exercise  = cholesterol = angina = stroke = attack = [0] * 2
and This work bad!
if I define later line such this, problem has been solve:
    smoke=[0]*2
    exercise  = [0]*2
    cholesterol = [0]*2
    angina = [0]*2
    stroke = [0]*2

I just change this line in my project but result changed!

Is this a bug?

*****************************************
*****************************************

notice to "Smoke" change in follow,
"Smoke" changed from [0, 1] to [0 ,6] in a one state, for what??!!

*****************************************
out put before change:

> $ python3.5 ./my.py
smoke=  [0, 0]
                      before income: [0, 0, 0, 0, 0, 0, 0, 0]
income[ 5 ] += 1       after income: [0, 0, 0, 0, 0, 1, 0, 0]
                      before smoke: [0, 0]
2
smoke[ 1 ] += 1       after smoke: [0, 1]
stop in step
                      before income: [0, 0, 0, 0, 0, 1, 0, 0]
income[ 1 ] += 1       after income: [0, 1, 0, 0, 0, 1, 0, 0]
                      before smoke: [0, 6]
2
smoke[ 1 ] += 1       after smoke: [0, 7]
stop in step
                      before income: [0, 1, 0, 0, 0, 1, 0, 0]
income[ 5 ] += 1       after income: [0, 1, 0, 0, 0, 2, 0, 0]
                      before smoke: [2, 10]
1
smoke[ 0 ] += 1       after smoke: [3, 10]
stop in step       

*****************************************

out put after change:
>$ python3.5 my1.py 
smoke=  [0, 0]
                      before income: [0, 0, 0, 0, 0, 0, 0, 0]
income[ 5 ] += 1       after income: [0, 0, 0, 0, 0, 1, 0, 0]
                      before smoke: [0, 0]
2
smoke[ 1 ] += 1       after smoke: [0, 1]
stop in step
                      before income: [0, 0, 0, 0, 0, 1, 0, 0]
income[ 1 ] += 1       after income: [0, 1, 0, 0, 0, 1, 0, 0]
                      before smoke: [0, 1]
2
smoke[ 1 ] += 1       after smoke: [0, 2]
stop in step
                      before income: [0, 1, 0, 0, 0, 1, 0, 0]
income[ 5 ] += 1       after income: [0, 1, 0, 0, 0, 2, 0, 0]
                      before smoke: [0, 2]
1
smoke[ 0 ] += 1       after smoke: [1, 2]
stop in step

*****************************************

:/

Thanks
History
Date User Action Args
2016-11-03 07:23:18saeedsetrecipients: + saeed, ezio.melotti
2016-11-03 07:23:18saeedsetmessageid: <1478157798.51.0.0317356859068.issue28594@psf.upfronthosting.co.za>
2016-11-03 07:23:18saeedlinkissue28594 messages
2016-11-03 07:23:18saeedcreate