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 mbaynham
Recipients mbaynham
Date 2009-05-26.08:54:00
SpamBayes Score 5.177104e-06
Marked as misclassified No
Message-id <1243328043.86.0.156653383974.issue6113@psf.upfronthosting.co.za>
In-reply-to
Content
What I intended was...
I create a list of DIFFERENT instances of the same class, I wanted them
to be different instances, with different values for the properties,
stressing the word "DIFFERENT".

What I originally did was...
The __init__ assigns default values for the properties (eg, iId = 0, and
sName = ''), then I would change to properties before adding it to the
list.  However, the list will contain the right number of elements, but
every element is the same instance of the class.

I resolved this by...
If I change __init__ such that I'm passing it parameters with values to
assign to the properties.  And then adding the instances of the class to
the list.  Then each element in the list is a different instance.  And
this made everything work.
History
Date User Action Args
2009-05-26 08:54:04mbaynhamsetrecipients: + mbaynham
2009-05-26 08:54:03mbaynhamsetmessageid: <1243328043.86.0.156653383974.issue6113@psf.upfronthosting.co.za>
2009-05-26 08:54:01mbaynhamlinkissue6113 messages
2009-05-26 08:54:01mbaynhamcreate