On Tue, Jan 14, 2003 at 12:38:35PM -0800, Jonathan Sillito wrote:
> > -----Original Message-----
> > From: Dan Sugalski [mailto:[EMAIL PROTECTED]]
> 
> > A property is a runtime assignable name/value pair that you stick on
> > a variable or value. An attribute is a named variable that all
> > objects of a particular class have.
> >
> > Properties can come and go at runtime, but attributes are fixed. (I
> > think you could also consider attributes "instance variables", but
> > I'm a bit OO fuzzy so I'm not sure that's entirely right)
> 
> Ok, in the case of python or ruby, instance variables are not fixed and they
> are not declared as part of the class. I suppose this can be handled by
> giving such classes one hash attribute for storing these instance variables.

Yeah, that would be similar to how Python works now anyway; all
instance attributes are stored in a dict which is itself accessible as
an attribute on an instance: '__dict__'. Oh, except for the new
__slots__ feature, which might actually find a use with the
fixed-attribute-system that Dan has proposed.

-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/

Reply via email to