Re: Setting Class Attributes

2005-10-25 Thread Ron Adam
the.theorist wrote: > So that it'll be easier to remember the next time I find myself in the > same situation on a different task, I'll extend the discussion > somewhat. > > Coming from C, I had expected that I'd get a new empty dict every time > the __init__ function ran. Guido (or some other

Re: Setting Class Attributes

2005-10-25 Thread Steve Holden
the.theorist wrote: > So that it'll be easier to remember the next time I find myself in the > same situation on a different task, I'll extend the discussion > somewhat. > > Coming from C, I had expected that I'd get a new empty dict every time > the __init__ function ran. Guido (or some other ben

Re: Setting Class Attributes

2005-10-25 Thread the.theorist
So that it'll be easier to remember the next time I find myself in the same situation on a different task, I'll extend the discussion somewhat. Coming from C, I had expected that I'd get a new empty dict every time the __init__ function ran. Guido (or some other benevolent) had decided to implemen

Re: Setting Class Attributes

2005-10-25 Thread Bengt Richter
On 25 Oct 2005 15:57:41 -0700, "the.theorist" <[EMAIL PROTECTED]> wrote: > >Bruno Desthuilliers wrote: >> the.theorist a =E9crit : >> > I have a small, simple class which contains a dictionary (and some >> > other stuff, not shown). I then have a container class (Big) that holds >> > some instance

Re: Setting Class Attributes

2005-10-25 Thread the.theorist
Bruno Desthuilliers wrote: > the.theorist a écrit : > > I have a small, simple class which contains a dictionary (and some > > other stuff, not shown). I then have a container class (Big) that holds > > some instances of the simple class. When I try to edit the elements of > > the dictionary, all

Re: Setting Class Attributes

2005-10-25 Thread Bruno Desthuilliers
the.theorist a écrit : > I have a small, simple class which contains a dictionary (and some > other stuff, not shown). I then have a container class (Big) that holds > some instances of the simple class. When I try to edit the elements of > the dictionary, all instances obtain those changes; I want

Setting Class Attributes

2005-10-25 Thread the.theorist
I have a small, simple class which contains a dictionary (and some other stuff, not shown). I then have a container class (Big) that holds some instances of the simple class. When I try to edit the elements of the dictionary, all instances obtain those changes; I want each instance to hold separate