Re: [Tutor] Object instances

2005-11-07 Thread DS
All right! That's penetrated. Thanks very much. ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Object instances

2005-11-06 Thread Alan Gauld
> I'm not sure what language you've dealt with before, but if it was Java or > C++, then you've run into Python's variant of static members. > > class X(object): >classMember = True > >def __init__(self): >self.instanceMember = True > > > Does that make it any clearer? As to the why

Re: [Tutor] Object instances

2005-11-06 Thread Alan Gauld
>I had thought I was developing a clue regarding objects in Python, but I > ran across an oddity today that I didn't expect. It had seemed to me > that once an instance was created, it would have a separate data pool > from any other instance of the same object. And this is true... > It would sh

Re: [Tutor] Object instances

2005-11-06 Thread John Fouhy
On 07/11/05, DS <[EMAIL PROTECTED]> wrote: > So, I can see the error of my ways. I can also see that this behavior > gives me an opportunity to globally change a value in all of the object > instances, if I ever had to do something like that. I just don't have a > clue as to why objects were desi

Re: [Tutor] Object instances

2005-11-06 Thread Liam Clarke-Hutchinson
earer? As to the why, I'd ask Guido Van Rossum. ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of DS Sent: Monday, 7 November 2005 1:20 p.m. To: tutor@python.org Subject: [Tutor] Object instances I had thought I was developing a clue regarding obj

[Tutor] Object instances

2005-11-06 Thread DS
I had thought I was developing a clue regarding objects in Python, but I ran across an oddity today that I didn't expect. It had seemed to me that once an instance was created, it would have a separate data pool from any other instance of the same object. It would share methods, of course, but th