problems creating and adding class instances to a list:

Chris Rebert clp2 at
Tue Apr 20 00:58:01 CEST 2010

On Mon, Apr 19, 2010 at 3:41 PM, Xavier Ho <contact at> wrote:
> On Tue, Apr 20, 2010 at 7:38 AM, Chris Rebert <clp2 at> wrote:
>> Additionally, `self.x = int` might not do what you thought it does. It
>> does *not* create a new instance variable of type 'int'. Instead, it
>> literally assigns to a new instance variable x the *function*† that
>> converts values into integers.
> Thanks, Chris. I'm well aware of that. =]

It was obviously directed at the OP. :-)


More information about the Python-list mailing list