problems creating and adding class instances to a list:
Chris Rebert
clp2 at rebertia.com
Mon Apr 19 18:58:01 EDT 2010
On Mon, Apr 19, 2010 at 3:41 PM, Xavier Ho <contact at xavierho.com> wrote:
> On Tue, Apr 20, 2010 at 7:38 AM, Chris Rebert <clp2 at rebertia.com> 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. :-)
Cheers,
Chris
More information about the Python-list
mailing list